Namespace: shortString
Functions​
isASCII​
â–¸ isASCII(str
): boolean
Parameters​
Name | Type |
---|---|
str | string |
Returns​
boolean
Defined in​
isShortString​
â–¸ isShortString(str
): boolean
Parameters​
Name | Type |
---|---|
str | string |
Returns​
boolean
Defined in​
isDecimalString​
â–¸ isDecimalString(decim
): boolean
Parameters​
Name | Type |
---|---|
decim | string |
Returns​
boolean
Defined in​
isText​
â–¸ isText(val
): boolean
check if value is string text, and not string-hex, string-number
Parameters​
Name | Type | Description |
---|---|---|
val | any | any |
Returns​
boolean
boolean
Defined in​
splitLongString​
â–¸ splitLongString(longStr
): string
[]
Parameters​
Name | Type |
---|---|
longStr | string |
Returns​
string
[]
Defined in​
encodeShortString​
â–¸ encodeShortString(str
): string
Convert an ASCII string to an hexadecimal string.
Example
const myEncodedString: string = encodeShortString('uri/pict/t38.jpg');
returns: string("0x7572692f706963742f7433382e6a7067")
Parameters​
Name | Type | Description |
---|---|---|
str | string | ASCII string - 31 characters maxi. Ex: "uri/item23.jpg" |
Returns​
string
a string representing an Hex number 248 bits max.
Defined in​
decodeShortString​
â–¸ decodeShortString(str
): string
Convert an hexadecimal or decimal string to an ASCII string.
Example
const myDecodedString: string = decodeShortString('0x7572692f706963742f7433382e6a7067');
return string ("uri/pict/t38.jpg")
Parameters​
Name | Type | Description |
---|---|---|
str | string | string - representing a 248 bits max number. Ex: hex ("0x1A4F64EA56") or decimal ("236942575435676423") |
Returns​
string
a string with 31 characters max.
Defined in​
isShortText​
â–¸ isShortText(val
): boolean
Parameters​
Name | Type |
---|---|
val | any |
Returns​
boolean
Defined in​
isLongText​
â–¸ isLongText(val
): boolean
Parameters​
Name | Type |
---|---|
val | any |
Returns​
boolean