Decodes a string from a Base64 representation.
string uBase64Decode(input)
The string to decode.
To encode a string from Base64:
uBase64Dcode("QQAgAHMAZQA=") ;; returns "A secret="
Decodes a string into a Base64 representation.
string uBase64Encode(input)
The string to decode.
To encode a string into a Base64 representation:
uBase64DEncode("A secret") ;; returns "QQAgAHMAZQA="
Converts a date string into a different format using a source and a destination format string: The first parameter is the date string to be converted; the second parameter is a format string, specifying the date format of the input date string (see the following table). The outputformat parameter is optional, and if it is omitted, the date is converted in the format y-M-D H:N:S.
The function handles dates from 1582 to present day. If the date cannot be converted, the result string will be empty.
Identifier |
Description |
---|---|
Y |
Year 2-digits (06) |
y |
Year 4-digits (2006) |
C |
Century (20) |
M |
Month (03) |
m |
Month (JUN) |
D |
Day (12) |
H |
Hour (00..23) |
h |
Hour (01..12) |
N |
Minutes |
S |
Seconds |
s |
Hundreths of seconds |
t |
Thousandth of seconds |
A |
AM/PM |
d |
Day of week (5) |
D |
Day of week (Friday) |
E |
Day of year (001..366) |
G |
Week of year (01..52) |
F |
Week of month (1..6) |
string uConvertDate(datestring, inputformat [, outputformat])
The string to convert.
The date and time format of the input string.
(optional) The desired output format. If omitted, the default format is y-M-D H:N:S.
To convert date strings into a different formats:
uConvertDate("2005-06-27 00:00:00","y-M-D H:N:S","D mY") // returns "27 JUN 05"
uConvertDate("27 JUN 05", "D m Y") // returns "2005-06-27 00:00:00"
Converts a string of hexadecimal numbers into an integer.
integer uFromHex (input)
The string to convert.
Convert a hexadecimal string
uFromHex("A3F") // returns 2623 uFromHex("B") // returns 11
Converts an integer value into a hexadecimal string.
string uToHex (input)
The integer to convert.
To convert an integer:
uToHex(45) // returns “2D”
Composes a string from hexadecimal values.
string uHexDecode(input)
To compose a string from hex values:
uHexDecode("313730") // returns "170" uHexDecode(313730) // returns "170"
Encodes every character of a string into its hexadecimal notation
string uHexEncode(input)
The string to encode.
To convert a string to hex values:
uHexEncode("170") // returns "3313730" uHexEncode(170) // returns "3313730"
Converts a string into Unicode.
string uToUnicode (input , [codepage]
The input string.
Returns a decoded string replacing the escape sequences with their original values.
string uURIDecode(uri)
The URI to decode.
To decode a URI:
uURIDecode("www.sybase.com/filename%20with%20spaces.txt") // returns "www.sybase.com/filename with spaces.txt"
Returns a new version of a complete URI, replacing each instance of certain characters with escape sequences representing the UTF-8 encoding of the characters.
string uURIEncode(uri)
The URI to encode.
To encode a URI:
uURIEncode("www.sybase.com/filename with spaces.txt") // returns "www.sybase.com/filename%20with%20spaces.txt”