util package
public struct Locale
Locale struct represents specific geographical, political, or cultural region.
Field Name | Data Type | Description | Default Value |
---|---|---|---|
language | string | The language field for Locale | |
countryCode | string | The countryCode field for Locale |
-
<Locale> Locale.<init>()
public function base16ToBase64Encode(string baseString) returns (string)
Encodes a base16 encoded string to base64 encoding.
Parameter Name | Data Type | Description |
---|---|---|
baseString | string |
Return Variable | Data Type | Description |
---|---|---|
string | the encoded string. |
public function base64Decode(string s) returns (string)
Decodes a base64 encoded string to base10.
Parameter Name | Data Type | Description |
---|---|---|
s | string | string to be decoded |
Return Variable | Data Type | Description |
---|---|---|
string | the decoded string. |
public function base64Encode(string s) returns (string)
Encodes a base10 encoded string to base64.
Parameter Name | Data Type | Description |
---|---|---|
s | string | string to be encoded |
Return Variable | Data Type | Description |
---|---|---|
string | the encoded string. |
public function base64ToBase16Encode(string baseString) returns (string)
Encodes a base64 encoded string to base16 encoding.
Parameter Name | Data Type | Description |
---|---|---|
baseString | string |
Return Variable | Data Type | Description |
---|---|---|
string | the encoded string. |
public function parseJson(string s) returns (json | error)
Parse JSON string to generate JSON object.
Parameter Name | Data Type | Description |
---|---|---|
s | string | JSON string |
Return Variable | Data Type | Description |
---|---|---|
json | error | JSON object. |
public function uuid() returns (string)
Returns a random UUID string
Return Variable | Data Type | Description |
---|---|---|
string | The random string |