Updated smnp.text (markdown)

Bartłomiej Przemysław Pluta
2020-03-26 11:59:41 +01:00
parent 4beaf1b196
commit 0d1a1f6d06

@@ -12,8 +12,22 @@ Checks if length of string is greater than 0.
Tries to convert `string` to `int`. If the text actually represents an `int`, it returns it as of `int` type. It returns itself (as a `string`) otherwise.
## `string.substring(startIndex: int, endIndex: int)`
Returns a substring.
### Example
```
println("Hello world".substring(1, 5)); # ello
```
## `string.split(delimiter: string)`
Splits the string with given delimiter to list of strings and returns it.
### Example
```
str = "this:is:some:text";
println(str.split(":")); # [this, is, some, text]
```
## `string.toFloat()`
Tries to convert `string` to `float`. If the text actually represents a `float`, it returns it as of `float` type. It returns itself (as a `string`) otherwise.