SString
ClientTypes
On this classMD5
Members 11
| Function | MD5 | Calculates the MD5Sum of input and returns the result as a hexadecimal string |
| Function | SHA1 | – |
| Function | Replace | – |
| Function | GenerateGUID | – |
| Function | Base64Encode | Converts input to Base64 and returns the result |
| Function | Base64Decode | Converts input from Base64 and returns the result |
| Function | GetBytes | Converts input to bytes using UTF8 encoding |
| Function | GetString | Converts input to a UTF8 string |
| Function | EncodeURL | – |
| Function | DecodeURL | – |
| Function | RegexMatchResult | – |
Static Functions
MD5
static string MD5(string input)
Calculates the MD5Sum of input and returns the result as a hexadecimal string
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
md5 = Space.String.MD5('AString')
SHA1
static string SHA1(string input)
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
sha1 = Space.String.SHA1('AString')
Replace
static string Replace(string old, string pattern, string replace)
Parameters
| Name | Type | Default |
|---|---|---|
| old | string | – |
| pattern | string | – |
| replace | string | – |
Returns
string
Example
Lua
replaced = Space.String.Replace('AString', 'APattern', 'AReplace')
GenerateGUID
static string GenerateGUID()
Returns
string
Example
Lua
guid = Space.String.GenerateGUID()
Base64Encode
static string Base64Encode(string input)
Converts input to Base64 and returns the result
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
baseEncodeByte = Space.String.Base64Encode{117, 116, 32, 116, 100, 101})
Base64Decode
static string Base64Decode(string input)
Converts input from Base64 and returns the result
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
baseDecodedStr = Space.String.Base64Decode('aW5wdXQgdG8gZW5jb2Rl')
GetBytes
static byte[] GetBytes(string input)
Converts input to bytes using UTF8 encoding
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
byte[]
Example
Lua
stringAsByteArray = Space.String.GetBytes('A String')
GetString
static string GetString(byte[] bytes)
Converts input to a UTF8 string
Parameters
| Name | Type | Default |
|---|---|---|
| bytes | byte[] | – |
Returns
string
Example
Lua
ByteArrayAsString = Space.String.GetString({115, 111, 109, 101, 32})
EncodeURL
static string EncodeURL(string input)
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
encodedURL = Space.String.EncodeURL('A String')
DecodeURL
static string DecodeURL(string input)
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
Returns
string
Example
Lua
decodedURL = Space.String.DecodeURL('A String')
RegexMatchResult
static string RegexMatchResult(string input, string pattern, string replacement)
Parameters
| Name | Type | Default |
|---|---|---|
| input | string | – |
| pattern | string | – |
| replacement | string | – |
Returns
string
Example
Lua
Space.Math.RegexMatchResult('astring', 'astring','astring')



