M3D / M3D / Utility / StringHelper
Class: StringHelper
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new StringHelper(): StringHelper
Returns
Properties
onceLength
▪ Static
onceLength: number
Methods
transferredMeaning
▸ transferredMeaning(str
): string
将字符串中带转义字符的转成正常的
Parameters
Name | Type |
---|---|
str | any |
Returns
string
charCodeToString
▸ charCodeToString(data
, offset
, length?
): string
Parameters
Name | Type |
---|---|
data | ArrayBuffer |
offset | number |
length? | number |
Returns
string
findStrIndex
▸ findStrIndex(str
, cha
, num
): any
Parameters
Name | Type |
---|---|
str | any |
cha | any |
num | any |
Returns
any
parseXmlString
▸ parseXmlString(text
): any
Parameters
Name | Type |
---|---|
text | string |
Returns
any
split
▸ split(target
, delimiter
): string
[]
Parameters
Name | Type |
---|---|
target | string |
delimiter | string |
Returns
string
[]
Description
if split "a,b,,d" by ",", result is "a", "b", "", "d".
versionCompare
▸ versionCompare(parVersion
, oldVersion?
): number
Parameters
Name | Type |
---|---|
parVersion | string |
oldVersion? | string |
Returns
number
Description
版本比较,参数版本与内核版本进行比较,若参数版本较高则返回1,若参数版本低则返回-1,若相等则返回0