v0.13.8

C_StringUtil

namespaceavailable in: camelot

Status in wowlua

15 functions: 15 implemented, 0 recorded, 0 guessed.

Functions

functionwhat it doesstatus
CreateAbbreviatedNumberFormatterCreates a numeric formatter that converts numbers to abbreviated strings, eg. 123456 -> '123k'.
(): AbbreviatedNumberFormatter
implemented
CreateNumericRuleFormatterCreates a numeric formatter that converts numbers to strings with flexible rulesets.
(): NumericRuleFormatter
implemented
CreateSecondsFormatterCreates a numeric formatter that converts numbers measuring durations in seconds to strings, eg. 93 -> '1m 33s'.
(): SecondsFormatter
implemented
EscapeDecimalNonPrintablesReturns a string with ASCII control characters (except , , and ) and invalid UTF-8 bytes replaced by decimal escape sequences (e.g. \127).
(text: stringView): string
implemented
EscapeLuaFormatStringReturns a string with Lua format string tokens ('%') escaped.
(text: string): stringView
implemented
EscapeLuaPatternsReturns a string with all Lua pattern characters escaped.
(text: stringView): string
implemented
EscapeQuotedCodesReturns a string with all quoted code sequences ('|' characters) escaped.
(text: string): stringView
implemented
FloorToNearestStringReturns the number rounded down to a whole number, as text. · by wowlua
(number: number): string
implemented
GetDefaultAbbreviationBreakpointsReturns the default breakpoints used to abbreviate large numbers. · by wowlua
(locale: WowLocale?): NumberAbbreviationBreakpoint[]
implemented
RemoveContiguousSpacesReturns a string with all contiguous occurrences of ASCII space characters truncated.
(text: stringView, maxAllowedSpaces: number): string
implemented
RoundToNearestStringReturns the number rounded to the nearest whole number, as text. · by wowlua
(number: number): string
implemented
StripHyperlinksReturns the text with its hyperlinks and other markup removed. · by wowlua
(text: string, maintainColor: boolean, maintainBrackets: boolean, stripNewlines: boolean, maintainAtlases: boolean, maintainTextures: boolean): stringView
implemented
StripTextureMarkupForLooseFilesReturns the text with markup of textures loaded from loose files removed. · by wowlua
(text: string): stringView
implemented
TruncateWhenZeroFormats the given number to a string as an integer (rounding down). If the integer is zero, returns an empty string.
(number: number): string
implemented
WrapStringReturns a string with 'prefix' and 'suffix' joined to 'infix' iif 'infix' is not an empty string. Else, an empty string is returned.
(infix: stringView, prefix: stringView?, suffix: stringView?): string
implemented

"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.

Structures

  • NumberAbbrevOptions · breakpointData?, locale?, config?
  • StripHyperlinkOptions · maintainColor, maintainBrackets, stripNewlines, maintainAtlases, maintainTextures

sources

Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (2 systems, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.