From The Sims Wiki, a collaborative database for The Sims series
This is the current revision of this page, as edited by K6ka (talk | contribs ) at 14:30, 11 April 2019 . The present address (URL) is a permanent link to this version. (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation
Jump to search
All tests passed.
test_match
Text
Expected
Actual
Template:Tick
{{#invoke:String|match|dog (cat)|%((%a-)%)}}
cat
cat
Template:Tick
{{#invoke:String|match|dog (cat) (canary) (fish)|%((%a-)%)||-1}}
fish
fish
Template:Tick
{{#invoke:String|match|dog (cat) (canary) (fish)|%((%a-)%)||2}}
canary
canary
Template:Tick
{{#invoke:String|match|dog (cat) (canary) (fish)|%((%a-)%)|6|1}}
canary
canary
Template:Tick
{{#invoke:String|match|dog (cat) (canary) (fish)|%((%a-)%)|6|2}}
fish
fish
Template:Tick
{{#invoke:String|match|dog (cat)|%((%a-)%)||2|no_category=true}}
String Module Error: Match not found
String Module Error: Match not found
Template:Tick
{{#invoke:String|match|dog (cat)|%((%a-)%)||2|ignore_errors=true}}
test_rep
Text
Expected
Actual
Template:Tick
{{#invoke:String|rep|abc|1}}
abc
abc
Template:Tick
{{#invoke:String|rep|a b|7}}
a ba ba ba ba ba ba b
a ba ba ba ba ba ba b
Template:Tick
{{#invoke:String|rep|bla|glug|no_category=true}}
String Module Error: function rep expects a number as second parameter, received "glug"
String Module Error: function rep expects a number as second parameter, received "glug"
Template:Tick
{{#invoke:String|rep|bla|glug|ignore_errors=true}}
Template:Tick
{{#invoke:String|rep|àèò|3}}
àèòàèòàèò
àèòàèòàèò
test_replace
Text
Expected
Actual
Template:Tick
{{#invoke:String|replace|1.1.1.1|.|/}}
1/1/1/1
1/1/1/1
Template:Tick
{{#invoke:String|replace|alpha (beta)| (| gamma (}}
alpha gamma (beta)
alpha gamma (beta)
Template:Tick
{{#invoke:String|replace|Dog (cat)|%s%(.*%)||plain=false}}
Dog
Dog