Module talk:String/toetsgevalle

Alle toetse geslaag.

test_find:

Teks Verwag Werklik
{{#invoke:String/Sandput|find|}} 0 0
{{#invoke:String/Sandput|find|source=}} 0 0
{{#invoke:String/Sandput|find|source=|target=}} 0 0
{{#invoke:String/Sandput|find|source=|target=Bob}} 0 0
{{#invoke:String/Sandput|find|Bob|Joe}} 0 0
{{#invoke:String/Sandput|find|Bob|b}} 3 3
{{#invoke:String/Sandput|find|Bob Joe|oe}} 6 6
{{#invoke:String/Sandput|find|source= Bob |o}} 2 2
{{#invoke:String/Sandput|find| Bob |o}} 3 3
{{#invoke:String/Sandput|find|높지만 급격히|만}} 3 3
{{#invoke:String/Sandput|find|source=BAAAB|target=%w|plain=false}} 1 1
{{#invoke:String/Sandput|find|source=BAAAB|target=%w|start=3|plain=false}} 3 3
{{#invoke:String/Sandput|find|source=BAAAB|target=(%w)%1|plain=false}} 2 2

test_len:

Teks Verwag Werklik
{{#invoke:String/Sandput|len| foo }} 5 5
{{#invoke:String/Sandput|len|s= foo }} 3 3
{{#invoke:String/Sandput|len|}} 0 0
{{#invoke:String/Sandput|len|s=}} 0 0
{{#invoke:String/Sandput|len| }} 3 3
{{#invoke:String/Sandput|len|最近の更新}} 5 5

test_match:

Teks Verwag Werklik
{{#invoke:String/Sandput|match|dog (cat)|%((%a-)%)}} cat cat
{{#invoke:String/Sandput|match|dog (cat) (canary) (fish)|%((%a-)%)||-1}} fish fish
{{#invoke:String/Sandput|match|dog (cat) (canary) (fish)|%((%a-)%)||2}} canary canary
{{#invoke:String/Sandput|match|dog (cat) (canary) (fish)|%((%a-)%)|6|1}} canary canary
{{#invoke:String/Sandput|match|dog (cat) (canary) (fish)|%((%a-)%)|6|2}} fish fish
{{#invoke:String/Sandput|match|dog (cat)|%((%a-)%)||2|no_category=true}} String Module Error: Match not found String Module Error: Match not found
{{#invoke:String/Sandput|match|dog (cat)|%((%a-)%)||2|ignore_errors=true}}

test_rep:

Teks Verwag Werklik
{{#invoke:String/Sandput|rep|abc|1}} abc abc
{{#invoke:String/Sandput|rep|a b|7}} a ba ba ba ba ba ba b a ba ba ba ba ba ba b
{{#invoke:String/Sandput|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"
{{#invoke:String/Sandput|rep|bla|glug|ignore_errors=true}}

test_replace:

Teks Verwag Werklik
{{#invoke:String/Sandput|vervang|1.1.1.1|.|/}} 1/1/1/1 1/1/1/1
{{#invoke:String/Sandput|vervang|alpha (beta)| (| gamma (}} alpha gamma (beta) alpha gamma (beta)
{{#invoke:String/Sandput|vervang|Dog (cat)|%s%(.*%)||gewoon=false}} Dog Dog


Begin 'n bespreking oor Module:String/toetsgevalle

Begin 'n bespreking
Terug na "String/toetsgevalle"-bladsy.