String

String

Methods

add_Class(className) → {string}

Source:
Parameters:
Name Type Description
className string
Returns:
Type
string

add_Class(newClass) → {string}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
string

base64decode() → {string}

Source:
Returns:
Type
string

base64decode() → {string}

Source:
Returns:
Type
string

base64decodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64decodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64decodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64decodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64decodeClean() → {string}

Source:
Returns:
Type
string

base64decodeClean() → {string}

Source:
Returns:
Type
string

base64encode() → {string}

Source:
Returns:
Type
string

base64encode() → {string}

Source:
Returns:
Type
string

base64encodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64encodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64encodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64encodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64encodeClean() → {string}

Source:
Returns:
Type
string

base64encodeClean() → {string}

Source:
Returns:
Type
string

buildQuery() → {Object.<string, string>}

Source:

"asd asdsdf param:sdd test:data 2 info".buildQuery() {keys: ["", "param", "test"], _: 'asd asdsdf', param: 'sdd', test: 'data 2 info'}

Returns:
Type
Object.<string, string>

buildQuery() → {Object.<string, (string|Array.<string>)>}

Source:

Returns a list of parameters included in a string

Example
'my-demo testIndex: 23 with testValue: "demo content"'.buildQuery()
// returns
{
    "_keys": [
        "testindex",
        "testvalue"
    ],
    "_": "my-demo",
    "testindex": "23 with",
    "testvalue": "\"demo content\""
}
Returns:
Type
Object.<string, (string|Array.<string>)>

buildSearchArray() → {Array.<string>}

Source:

"23 test "composed param" 234".buildSearchArray() ['23', 'test', 'composed param', '234']

Returns:
Type
Array.<string>

buildSearchArray() → {Array.<string>}

Source:

Returns a list of parameters included in a string

Example
'"this is" "list of fragments"'.buildSearchArray()
// returns
[
    "this is",
    "list of fragments"
]
Returns:
Type
Array.<string>

cleanTags() → {string}

Source:

remove dangerous HTML Tags

Returns:
Type
string

cleanTags() → {string}

Source:

remove risky tags from HTML Code: comments, script, iframe, style, object, noscript, frame, frameset

Returns:
Type
string

decodeURI() → {string}

Source:
Returns:
Type
string

decodeURI() → {string}

Source:
Returns:
Type
string

decryptAes(password, bytesopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
bytes 128 | 256 | 512 <optional>
128
Returns:
Type
string

decryptAes(password, sizeopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
size number <optional>
128
Returns:
Type
string

decryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

decryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

del_Class(className) → {string}

Source:
Parameters:
Name Type Description
className string
Returns:
Type
string

del_Class(newClass) → {string}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
string

encodeURI() → {string}

Source:
Returns:
Type
string

encodeURI() → {string}

Source:
Returns:
Type
string

encryptAes(password, bytesopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
bytes 128 | 256 | 512 <optional>
128
Returns:
Type
string

encryptAes(password, sizeopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
size number <optional>
128
Returns:
Type
string

encryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

encryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

escape() → {string}

Source:
Returns:
Type
string

escape() → {string}

Source:
Returns:
Type
string

escapeHex() → {string}

Source:
Returns:
Type
string

escapeHex() → {string}

Source:
Returns:
Type
string

fnd_Class(className) → {boolean}

Source:

find a class

Parameters:
Name Type Description
className string
Returns:
Type
boolean

fnd_Class(newClass) → {boolean}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
boolean

fromHex() → {string}

Source:
Returns:
Type
string

fromHex() → {string}

Source:
Returns:
Type
string

fromHtml() → {string}

Source:
Returns:
Type
string

fromHtml() → {string}

Source:

decode from HTML ( works in Browser )

Returns:
Type
string

lcfirst(kopt) → {string}

Source:

lowercase first [k] letters from word

Parameters:
Name Type Attributes Default Description
k number <optional>
1
Returns:
Type
string

lcfirst(lengthopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
length number <optional>
1

how many first chars to be transformed to uppercase

Returns:
Type
string

markdown() → {string}

Source:
Returns:
Type
string

match_str(reg_exp, flagsopt) → {Array.<string>|null}

Source:
Parameters:
Name Type Attributes Description
reg_exp string
flags string <optional>
Returns:
Type
Array.<string> | null

match_str(rule, flagsopt) → {Array|object}

Source:
Parameters:
Name Type Attributes Description
rule string

reg exp rule in string format

flags string <optional>

reg exp flags

Returns:
Type
Array | object

md5() → {string}

Source:
Returns:
Type
string

md5() → {string}

Source:
Returns:
Type
string

parseUrl(kopt) → {String.String_parseUrl_return}

Source:
Parameters:
Name Type Attributes Default Description
k boolean <optional>
false

decode get vars

Returns:
Type
String.String_parseUrl_return

parseUrl(modeopt) → {object}

Source:
Parameters:
Name Type Attributes Description
mode "get_vars" | boolean <optional>
Returns:
Type
object

parseUrlVars(jsonopt, paramsopt) → {Object.<string, any>}

Source:
Parameters:
Name Type Attributes Default Description
json boolean <optional>
false
params object <optional>
Properties
Name Type Attributes Default Description
keepOBJ boolean <optional>
false
isURL boolean <optional>
false
Returns:
Type
Object.<string, any>

sha1() → {string}

Source:
Returns:
Type
string

sha1(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

sha256() → {string}

Source:
Returns:
Type
string

sha256(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

subs(p, iopt) → {string}

Source:

similar as PHP subs

Parameters:
Name Type Attributes Description
p number
i number <optional>
Returns:
Type
string

subs(index, lastIndexopt) → {string}

Source:
Parameters:
Name Type Attributes Description
index number
lastIndex number <optional>
Returns:
Type
string

subs(index, count) → {string}

Source:
Parameters:
Name Type Description
index number
count number
Returns:
Type
string

swp_case() → {string}

Source:

swap letters' case

Returns:
Type
string

swp_case() → {string}

Source:
Returns:
Type
string

toArrayBufferFromUtf8() → {ArrayBuffer}

Source:
Returns:
Type
ArrayBuffer

toArrayBufferFromUtf8() → {ArrayBuffer}

Source:
Returns:
Type
ArrayBuffer

toHex(utf8) → {string}

Source:
Parameters:
Name Type Description
utf8 boolean
Returns:
Type
string

toHex(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

toHtml() → {string}

Source:
Returns:
Type
string

toHtml() → {string}

Source:

encode in HTML

Returns:
Type
string

toHtmlSimple() → {string}

Source:
Returns:
Type
string

toHtmlSimple() → {string}

Source:

encode in HTML minimal

Returns:
Type
string

toRegexp(flagsopt) → {string}

Source:
Parameters:
Name Type Attributes Description
flags string <optional>
Returns:
Type
string

toRegexp() → {RegExp}

Source:
Returns:
Type
RegExp

ucfirst(kopt) → {string}

Source:

uppercase first [k] letters from word

Parameters:
Name Type Attributes Default Description
k number <optional>
1
Returns:
Type
string

ucfirst(lengthopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
length number <optional>
1

how many first chars to be transformed to uppercase

Returns:
Type
string

unescape() → {string}

Source:
Returns:
Type
string

unescape() → {string}

Source:
Returns:
Type
string

unicode() → {string}

Source:

similar as utf8decode

Returns:
Type
string

unicode() → {string}

Source:
See:
Returns:
Type
string

utf8() → {string}

Source:

similar as utf8encode

Returns:
Type
string

utf8() → {string}

Source:
See:
Returns:
Type
string

utf8decode() → {string}

Source:
Returns:
Type
string

utf8decode() → {string}

Source:
Returns:
Type
string

utf8encode() → {string}

Source:
Returns:
Type
string

utf8encode() → {string}

Source:
Returns:
Type
string

utf8need() → {string}

Source:
Returns:
Type
string

utf8need() → {string}

Source:

Detects if a string is unicode, and if it is, then it is transformed to UTF8

Returns:
Type
string

Type Definitions

String_parseUrl_return

Source:
Properties:
Name Type Attributes Description
original string

https://www.test.example.com/path/data?request=5#search

origin string

www.test.example.com

domain string

www.test.example.com

domain_short string

test.example.com

pathname string

/path/data

reqQuery string

request=5

protocol string

https

protocoll string

https://

get_vars Object.<string, any> <optional>
url string

deprecated

url_p string

deprecated

isIp string

deprecated

Type:
  • object

String

Methods

add_Class(className) → {string}

Source:
Parameters:
Name Type Description
className string
Returns:
Type
string

add_Class(newClass) → {string}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
string

base64decode() → {string}

Source:
Returns:
Type
string

base64decode() → {string}

Source:
Returns:
Type
string

base64decodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64decodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64decodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64decodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64decodeClean() → {string}

Source:
Returns:
Type
string

base64decodeClean() → {string}

Source:
Returns:
Type
string

base64encode() → {string}

Source:
Returns:
Type
string

base64encode() → {string}

Source:
Returns:
Type
string

base64encodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64encodeBytes() → {Uint8Array}

Source:
Returns:
Type
Uint8Array

base64encodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64encodeBytesArray() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

base64encodeClean() → {string}

Source:
Returns:
Type
string

base64encodeClean() → {string}

Source:
Returns:
Type
string

buildQuery() → {Object.<string, string>}

Source:

"asd asdsdf param:sdd test:data 2 info".buildQuery() {keys: ["", "param", "test"], _: 'asd asdsdf', param: 'sdd', test: 'data 2 info'}

Returns:
Type
Object.<string, string>

buildQuery() → {Object.<string, (string|Array.<string>)>}

Source:

Returns a list of parameters included in a string

Example
'my-demo testIndex: 23 with testValue: "demo content"'.buildQuery()
// returns
{
    "_keys": [
        "testindex",
        "testvalue"
    ],
    "_": "my-demo",
    "testindex": "23 with",
    "testvalue": "\"demo content\""
}
Returns:
Type
Object.<string, (string|Array.<string>)>

buildSearchArray() → {Array.<string>}

Source:

"23 test "composed param" 234".buildSearchArray() ['23', 'test', 'composed param', '234']

Returns:
Type
Array.<string>

buildSearchArray() → {Array.<string>}

Source:

Returns a list of parameters included in a string

Example
'"this is" "list of fragments"'.buildSearchArray()
// returns
[
    "this is",
    "list of fragments"
]
Returns:
Type
Array.<string>

cleanTags() → {string}

Source:

remove dangerous HTML Tags

Returns:
Type
string

cleanTags() → {string}

Source:

remove risky tags from HTML Code: comments, script, iframe, style, object, noscript, frame, frameset

Returns:
Type
string

decodeURI() → {string}

Source:
Returns:
Type
string

decodeURI() → {string}

Source:
Returns:
Type
string

decryptAes(password, bytesopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
bytes 128 | 256 | 512 <optional>
128
Returns:
Type
string

decryptAes(password, sizeopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
size number <optional>
128
Returns:
Type
string

decryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

decryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

del_Class(className) → {string}

Source:
Parameters:
Name Type Description
className string
Returns:
Type
string

del_Class(newClass) → {string}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
string

encodeURI() → {string}

Source:
Returns:
Type
string

encodeURI() → {string}

Source:
Returns:
Type
string

encryptAes(password, bytesopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
bytes 128 | 256 | 512 <optional>
128
Returns:
Type
string

encryptAes(password, sizeopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
password string
size number <optional>
128
Returns:
Type
string

encryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

encryptTea(password) → {string}

Source:
Parameters:
Name Type Description
password string
Returns:
Type
string

escape() → {string}

Source:
Returns:
Type
string

escape() → {string}

Source:
Returns:
Type
string

escapeHex() → {string}

Source:
Returns:
Type
string

escapeHex() → {string}

Source:
Returns:
Type
string

fnd_Class(className) → {boolean}

Source:

find a class

Parameters:
Name Type Description
className string
Returns:
Type
boolean

fnd_Class(newClass) → {boolean}

Source:
Parameters:
Name Type Description
newClass string
Returns:
Type
boolean

fromHex() → {string}

Source:
Returns:
Type
string

fromHex() → {string}

Source:
Returns:
Type
string

fromHtml() → {string}

Source:
Returns:
Type
string

fromHtml() → {string}

Source:

decode from HTML ( works in Browser )

Returns:
Type
string

lcfirst(kopt) → {string}

Source:

lowercase first [k] letters from word

Parameters:
Name Type Attributes Default Description
k number <optional>
1
Returns:
Type
string

lcfirst(lengthopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
length number <optional>
1

how many first chars to be transformed to uppercase

Returns:
Type
string

markdown() → {string}

Source:
Returns:
Type
string

match_str(reg_exp, flagsopt) → {Array.<string>|null}

Source:
Parameters:
Name Type Attributes Description
reg_exp string
flags string <optional>
Returns:
Type
Array.<string> | null

match_str(rule, flagsopt) → {Array|object}

Source:
Parameters:
Name Type Attributes Description
rule string

reg exp rule in string format

flags string <optional>

reg exp flags

Returns:
Type
Array | object

md5() → {string}

Source:
Returns:
Type
string

md5() → {string}

Source:
Returns:
Type
string

parseUrl(kopt) → {String.String_parseUrl_return}

Source:
Parameters:
Name Type Attributes Default Description
k boolean <optional>
false

decode get vars

Returns:
Type
String.String_parseUrl_return

parseUrl(modeopt) → {object}

Source:
Parameters:
Name Type Attributes Description
mode "get_vars" | boolean <optional>
Returns:
Type
object

parseUrlVars(jsonopt, paramsopt) → {Object.<string, any>}

Source:
Parameters:
Name Type Attributes Default Description
json boolean <optional>
false
params object <optional>
Properties
Name Type Attributes Default Description
keepOBJ boolean <optional>
false
isURL boolean <optional>
false
Returns:
Type
Object.<string, any>

sha1() → {string}

Source:
Returns:
Type
string

sha1(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

sha256() → {string}

Source:
Returns:
Type
string

sha256(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

subs(p, iopt) → {string}

Source:

similar as PHP subs

Parameters:
Name Type Attributes Description
p number
i number <optional>
Returns:
Type
string

subs(index, lastIndexopt) → {string}

Source:
Parameters:
Name Type Attributes Description
index number
lastIndex number <optional>
Returns:
Type
string

subs(index, count) → {string}

Source:
Parameters:
Name Type Description
index number
count number
Returns:
Type
string

swp_case() → {string}

Source:

swap letters' case

Returns:
Type
string

swp_case() → {string}

Source:
Returns:
Type
string

toArrayBufferFromUtf8() → {ArrayBuffer}

Source:
Returns:
Type
ArrayBuffer

toArrayBufferFromUtf8() → {ArrayBuffer}

Source:
Returns:
Type
ArrayBuffer

toHex(utf8) → {string}

Source:
Parameters:
Name Type Description
utf8 boolean
Returns:
Type
string

toHex(isUtf8opt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
isUtf8 boolean <optional>
true
Returns:
Type
string

toHtml() → {string}

Source:
Returns:
Type
string

toHtml() → {string}

Source:

encode in HTML

Returns:
Type
string

toHtmlSimple() → {string}

Source:
Returns:
Type
string

toHtmlSimple() → {string}

Source:

encode in HTML minimal

Returns:
Type
string

toRegexp(flagsopt) → {string}

Source:
Parameters:
Name Type Attributes Description
flags string <optional>
Returns:
Type
string

toRegexp() → {RegExp}

Source:
Returns:
Type
RegExp

ucfirst(kopt) → {string}

Source:

uppercase first [k] letters from word

Parameters:
Name Type Attributes Default Description
k number <optional>
1
Returns:
Type
string

ucfirst(lengthopt) → {string}

Source:
Parameters:
Name Type Attributes Default Description
length number <optional>
1

how many first chars to be transformed to uppercase

Returns:
Type
string

unescape() → {string}

Source:
Returns:
Type
string

unescape() → {string}

Source:
Returns:
Type
string

unicode() → {string}

Source:

similar as utf8decode

Returns:
Type
string

unicode() → {string}

Source:
See:
Returns:
Type
string

utf8() → {string}

Source:

similar as utf8encode

Returns:
Type
string

utf8() → {string}

Source:
See:
Returns:
Type
string

utf8decode() → {string}

Source:
Returns:
Type
string

utf8decode() → {string}

Source:
Returns:
Type
string

utf8encode() → {string}

Source:
Returns:
Type
string

utf8encode() → {string}

Source:
Returns:
Type
string

utf8need() → {string}

Source:
Returns:
Type
string

utf8need() → {string}

Source:

Detects if a string is unicode, and if it is, then it is transformed to UTF8

Returns:
Type
string

Type Definitions

String_parseUrl_return

Source:
Properties:
Name Type Attributes Description
original string

https://www.test.example.com/path/data?request=5#search

origin string

www.test.example.com

domain string

www.test.example.com

domain_short string

test.example.com

pathname string

/path/data

reqQuery string

request=5

protocol string

https

protocoll string

https://

get_vars Object.<string, any> <optional>
url string

deprecated

url_p string

deprecated

isIp string

deprecated

Type:
  • object