> Functions
Splits the string string into substrings delimited by delimiter. To limit the split to a certain number of pieces, use the limit parameter.
In JavaScript, s.split(separator) splits like split in LeekScript, with two differences. Trailing empty pieces are kept: "a,b,,".split(",") is ["a", "b", "", ""], while LeekScript drops them and gives ["a", "b"]. And the second argument, although it is a maximum number of pieces in both languages, throws away the end of the string in JavaScript: "a,b,c".split(",", 2) is ["a", "b"] in JavaScript and ["a", "b,c"] in LeekScript, where the rest is kept in the last piece.
In Python, s.split(separator) raises a ValueError (empty separator) on an empty separator, where split in LeekScript then splits character by character — for that, write list(s). Three other differences:
"a,b,,".split(",") is ["a", "b", "", ""], while LeekScript drops them;s.split() splits on runs of whitespace and ignores leading and trailing whitespace: " a b ".split() is ["a", "b"];"a,b,c".split(",", 1) is ["a", "b,c"].split("456-789-123", "-") // ["456", "789", "123"] split("Hello", "") // ["H", "e", "l", "l", "o"] split("Hello", "zzz") // ["Hello"] split("456-789-123", "-", 2) // ["456", "789-123"]
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.