Module:String/doc
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
This is the documentation page for Module:String
Functions[edit source]
- len
- sub - return substring in a particular position
- sublength
- match
- pos
- str_find
- find
- replace
- rep - repeats a string a number of times
- escapePattern - escape certain characters
- count - number of occurrences found
- join - join using a separator character
- endswith - returns yes if found
Case insensitive matches[edit source]
Lua does not include functionality for this, but Template:Lowercase can be used, or similar functions in Lua.
Existing String manipulation templates[edit source]
- Template:Digits
- Template:First character
- Template:First word
- Template:Full stop character
- Template:Last
- Template:Last word
- Module:MultiReplace
- Template:MultiReplace
- Template:No fullstop
- Template:No fullstop/first
- Template:Nobr
- Template:PMC value
- Template:Remove first word
- Template:Replace
- Template:Right
- Template:Sentence
- Template:Sentencecase
- Template:Spaces
- Template:Str find
- Template:Str left
- Template:Str len
- Template:Str right
- Template:Str sub
- Template:String split
- Template:Strip invisible characters
- Template:Subr
- Template:Trim
- Template:Trim brackets
- Template:Trim punctuation
- Category:Lua String-based templates
See also[edit source]
- Module:String2, which contains:
- upper, lower, title, sentence,ucfirst, posnq, stripZeros, nowiki
- {{Str find}}
- Category:String manipulation templates