-
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
applications/system/js_app/examples/apps/Scripts/stringutils.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
let sampleText = "Hello, World!"; | ||
|
||
let lengthOfText = "Length of text: " + to_string(sampleText.length); | ||
print(lengthOfText); | ||
|
||
let start = 7; | ||
let end = 12; | ||
let substringResult = sampleText.slice(start, end); | ||
print(substringResult); | ||
|
||
let searchStr = "World"; | ||
let result2 = to_string(sampleText.indexOf(searchStr)); | ||
print(result2); | ||
|
||
let upperCaseText = "Text in upper case: " + to_upper_case(sampleText); | ||
print(upperCaseText); | ||
|
||
let lowerCaseText = "Text in lower case: " + to_lower_case(sampleText); | ||
print(lowerCaseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters