Unity forge
WWW.EscapeURL Manual     Reference     Scripting  
Scripting > Runtime Classes > WWW
WWW.EscapeURL
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • WWW
  • All Members
  • Variables
  • assetBundle
  • bytes
  • error
  • isDone
  • movie
  • oggVorbis
  • progress
  • text
  • texture
  • threadPriority
  • uploadProgress
  • url
  • Constructors
  • WWW
  • Functions
  • GetAudioClip
  • LoadImageIntoTexture
  • LoadUnityWeb
  • Class Functions
  • EscapeURL
  • LoadFromCacheOrDownload
  • UnEscapeURL

static function EscapeURL (s : string, e : Encoding = System.Text.Encoding.UTF8) : string

Parameters

Name Description
s A string to be escaped.
e The encoding to use when converting characters to a character code.

Returns

string - A new string with all illegal characters replaced with %xx where xx is the hexadecimal code for the character code.

Description

Encodes string into an URL-friendly format.

Replaces illegal characters in s with the correct URL escaped code. Useful when building web page parameters.

See Also: WWW.UnEscapeURL.

JavaScripts
// This will print the string "Testing%201%2C2%2C3" to the console
print(WWW.EscapeURL("Testing 1,2,3"));

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
print(WWW.EscapeURL("Testing 1,2,3"));
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
print(WWW.EscapeURL('Testing 1,2,3'))


Unity3d Рекламный блок Unity3d



Установить Adobe Flash плеер
Ruslan Slobodianiuk © unity3dforge.com все права защищены

Полезные ресурсы:

Программа для создания скриншотов