mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
slice (string)
This commit is contained in:
21
inputs/passing/stringMethods/slice.ts
Normal file
21
inputs/passing/stringMethods/slice.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// test_output! ["","","","🎨","🎨","🎨","한🎨","한🎨","🍹abc£한","🚀🍹abc£한🎨","🚀🍹abc£한🎨","🚀🍹abc£한🎨",""]
|
||||
|
||||
export default function () {
|
||||
const str = "🚀🍹abc£한🎨";
|
||||
|
||||
return [
|
||||
str.slice(-1),
|
||||
str.slice(-2),
|
||||
str.slice(-3),
|
||||
str.slice(-4),
|
||||
str.slice(-5),
|
||||
str.slice(-6),
|
||||
str.slice(-7),
|
||||
str.slice(-8),
|
||||
str.slice(1, -1),
|
||||
str.slice(),
|
||||
str.slice(0, 100),
|
||||
str.slice(0, 20),
|
||||
str.slice(10, -11),
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user