Updated smnp.text (markdown)
17
smnp.text.md
17
smnp.text.md
@@ -1,10 +1,25 @@
|
||||
# Methods
|
||||
## `string.find(char: string)`
|
||||
Returns index of given character in string and -1 if value not exist.
|
||||
|
||||
## `string.isEmpty()`
|
||||
Checks if length of string is equal to 0.
|
||||
|
||||
## `string.isNotEmpty()`
|
||||
Checks if length of string is greater than 0.
|
||||
|
||||
## `string.toInt()`
|
||||
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)`
|
||||
|
||||
## `string.split(delimiter: string)`
|
||||
|
||||
## `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.
|
||||
|
||||
## `string.toBool()`
|
||||
## `string.toNote()`
|
||||
Tries to convert `string` to `bool`. If the text actually is equal to `"true"` or `"false"`, it returns it as of `bool` type. It returns itself (as a `string`) otherwise.
|
||||
|
||||
## `string.toNote()`
|
||||
Tries to convert `string` to `note`. If the text actually represents a `note`, it returns it as of `note` type. It returns itself (as a `string`) otherwise.
|
||||
Reference in New Issue
Block a user