mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Remove string utilities already in MJS
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
let sampleText = "Hello, World!";
|
||||
|
||||
let lengthOfText = "Length of text: " + to_string(GetLength(sampleText));
|
||||
let lengthOfText = "Length of text: " + to_string(sampleText.length);
|
||||
print(lengthOfText);
|
||||
|
||||
let start = 7;
|
||||
let end = 12;
|
||||
let substringResult = substring(sampleText, start, end);
|
||||
let substringResult = sampleText.slice(start, end);
|
||||
print(substringResult);
|
||||
|
||||
let searchStr = "World";
|
||||
let result2 = to_string(indexOf(sampleText, searchStr));
|
||||
let result2 = to_string(sampleText.indexOf(searchStr));
|
||||
print(result2);
|
||||
|
||||
let upperCaseText = "Text in upper case: " + toUpperCase(sampleText);
|
||||
|
||||
Reference in New Issue
Block a user