User:Spacing form/sandbox: Difference between revisions

From TestWiki
Content added Content deleted
(testing parser functions)
 
No edit summary
Line 4: Line 4:


==Tests==
==Tests==

There should be functions or even entire modules available for better string parsing. I'll look into it later.


The word "module" has {{#invoke:String|len|module}} letters.
The word "module" has {{#invoke:String|len|module}} letters.


String index starts with 1, so {{#invoke:String|sub|module|2|4}}
String index starts with 1: {{#invoke:String|pos|module|1}}

Try nesting {{#invoke:String|rep|{{#invoke:String|sub|module|3|5}}|3}}

Supports UTF-8? {{#invoke:String|replace|Mississippi|ss|ß}}<ref>(actually incorrect)</ref>


Textural replacement: "ringing" becomes {{#invoke:String|replace|ringing|ing|}}
A "Scribunto ustring pattern": {{#invoke:String|replace|Looks powerful but I can't think of a use for it|o+|u|plain=false}}


----
Repetition (probably not usefull) {{#invoke:String|rep|hello|3}}

Revision as of 09:11, 4 March 2024

Please dont delete this page while I'm still working on it.

No links... :')

Tests

There should be functions or even entire modules available for better string parsing. I'll look into it later.

The word "module" has 6 letters.

String index starts with 1: m

Try nesting dulduldul

Supports UTF-8? Mißißippi[1]

A "Scribunto ustring pattern": Luks puwerful but I can't think uf a use fur it


  1. (actually incorrect)