Дополнительные действия
Это страница документации Модуль:StringUtils.
Library for additional string functions in lua.
API[править код]
-
Программное имя: String
Checks if a string starts with a certain substring.
{{#iccupdb_datapoint:API_StringUtils/doc_startsWith
|type=api
|name=startsWith
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a string starts with a certain substring.
|params=str: string, start: string
|returns=boolean
|module=Module:StringUtils
}}
}}
Checks if a string ends with a certain substring.
{{#iccupdb_datapoint:API_StringUtils/doc_endsWith
|type=api
|name=endsWith
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a string ends with a certain substring.
|params=str: string, ending: string
|returns=boolean
|module=Module:StringUtils
}}
}}
Splits a string by a given seperator and returns the sections in a table.
{{#iccupdb_datapoint:API_StringUtils/doc_split
|type=api
|name=split
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Splits a string by a given seperator and returns the sections in a table.
|params=inputstr: string, sep: string
|returns=table
|module=Module:StringUtils
}}
}}
Checks if a string contains a certain substring.
{{#iccupdb_datapoint:API_StringUtils/doc_contains
|type=api
|name=contains
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a string contains a certain substring.
|params=str: string, match: string
|returns=boolean
|module=Module:StringUtils
}}
}}
Trims a string of whitespaces at the start and end.
{{#iccupdb_datapoint:API_StringUtils/doc_trim
|type=api
|name=trim
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Trims a string of whitespaces at the start and end.
|params=str: string
|returns=boolean
|module=Module:StringUtils
}}
}}
If the string is empty this will return nil, else the string.
{{#iccupdb_datapoint:API_StringUtils/doc_nilIfEmpty
|type=api
|name=nilIfEmpty
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=If the string is empty this will return nil, else the string.
|params=str: string
|returns=string or nil
|module=Module:StringUtils
}}
}}
Checks if a string is empty.
{{#iccupdb_datapoint:API_StringUtils/doc_isEmpty
|type=api
|name=isEmpty
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a string is empty.
|params=str: string
|returns=boolean
|module=Module:StringUtils
}}
}}
Checks if a string is not empty.
{{#iccupdb_datapoint:API_StringUtils/doc_isNotEmpty
|type=api
|name=isNotEmpty
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a string is not empty.
|params=str: string
|returns=boolean
|module=Module:StringUtils
}}
}}
Splits the given string into pieces and then returns one of the pieces.
{{#iccupdb_datapoint:API_StringUtils/doc_explode
|type=api
|name=explode
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Splits the given string into pieces and then returns one of the pieces.
|params=str: string, delimiter: string, index: number
|returns=string
|module=Module:StringUtils
}}
}}
transforms a wiki code list (* text) into a html list (ul&li tags)
{{#iccupdb_datapoint:API_StringUtils/doc_convertWikiListToHtmlList
|type=api
|name=convertWikiListToHtmlList
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=transforms a wiki code list (* text) into a html list (ul&li tags)
|params=str: string, delimiter: string
|returns=string
|module=Module:StringUtils
}}
}}
Посмотрите всю нашу документацию iCCup здесь.