Returns number rounded to ndigits precision after the decimal point. If ndigits is omitted or is None, it returns the nearest integer to its input. It is a built-in Indie function (similar to Python’s).
Show parameters info
number
float
required
Number on which the function will be calculated.
round
(number, ndigits) -> float
Returns number rounded to ndigits precision after the decimal point. If ndigits is omitted or is None, it returns the nearest integer to its input. It is a built-in Indie function (similar to Python’s).
Cast constructor for built-in Indie type. Returns a bool value, i.e. one of True or False. The argument is converted using the standard Python’s truth testing procedure.
Show parameters info
x
bool
required
Value to cast from.
__init__
(x) -> None
Cast constructor for built-in Indie type. Returns a bool value, i.e. one of True or False. The argument is converted using the standard Python’s truth testing procedure.
Show parameters info
x
int
required
Value to cast from.
__init__
(x) -> None
Cast constructor for built-in Indie type. Returns a bool value, i.e. one of True or False. The argument is converted using the standard Python’s truth testing procedure.
Show parameters info
x
float
required
Value to cast from.
__init__
(x) -> None
Cast constructor for built-in Indie type. Returns a bool value, i.e. one of True or False. The argument is converted using the standard Python’s truth testing procedure.
Show parameters info
x
str
required
Value to cast from.
__init__
(x) -> None
Cast constructor for built-in Indie type. Returns a bool value, i.e. one of True or False. The argument is converted using the standard Python’s truth testing procedure.
Method __getslice__ should never be called directly, instead str_obj[slice] syntax should be used.
capitalize
() -> str
Returns the string with the first letter capitalized.
center
(length, character) -> str
Centers the string within the specified width using a fill character.
Show parameters info
length
int
required
Length of the result string.
character
str
default:" "
Fill character.
count
(value, start, end) -> int
Returns the count of non-overlapping occurrences of a substring within [start, end].
Show parameters info
value
str
required
Value to search for.
start
int
required
Start index to search.
end
int
required
End index to search.
endswith
(value, start, end) -> bool
Returns True if the string ends with the suffix, otherwise False.
Show parameters info
value
str
required
Value to check if the end of the string equals.
start
int
required
Start index to check the end of the string.
end
int
required
End index to check the end of the string.
find
(value, start, end) -> int
Returns the lowest index where the substring is found.
Show parameters info
value
str
required
Value to search for.
start
int
required
Start index for searching.
end
int
required
End index for searching.
Use the find() method to get the position of a substring. To check for its presence, use the in operator.
index
(value, start, end) -> int
Returns the lowest index of the substring within [start, end], raising an error if not found.
Show parameters info
value
str
required
Value to search for.
start
int
required
Start index for searching.
end
int
required
End index for searching.
isalpha
() -> bool
Returns True if the string contains only alphabetic characters and is not empty; otherwise, False.
islower
() -> bool
Returns True if all cased characters are lowercase and there is at least one, otherwise False.
isspace
() -> bool
Returns True if the string contains only whitespace and is not empty, otherwise False.
isupper
() -> bool
Returns True if all cased characters are uppercase and there is at least one, otherwise False.
join
(l) -> str
Returns a string that joins the elements of the list, using the string as a separator.
Show parameters info
l
list[str]
required
List of strings to join.
ljust
(length, character) -> str
Left justifies the string within the specified width, padding with the fill character. Returns the original string if width is less than or equal to its length.
Show parameters info
length
int
required
Length of the result string.
character
str
default:" "
Fill character.
lower
() -> str
Returns a copy of the string with all cased characters in lowercase.
lstrip
(symbols) -> str
Returns a copy of the string with leading characters removed.
Show parameters info
symbols
str
default:" "
Characters to remove.
partition
(s) -> list[str]
Splits the string at the first occurrence of sep and returns a list with the parts before, the separator, and after.
Show parameters info
s
str
required
String separator value.
replace
(oldvalue, newvalue, count) -> str
Returns a copy of the string with all occurrences of old replaced by new, or the first count occurrences if specified.
Show parameters info
oldvalue
str
required
Old value to search.
newvalue
str
required
New value to replace with.
count
int
default:-1
How many occurrences to replace.
rfind
(value, start, end) -> int
Returns the highest index of sub within [start, end], or -1 if not found.
Show parameters info
value
str
required
Value to search for.
start
int
required
Start index for searching.
end
int
required
End index for searching.
rindex
(value, start, end) -> int
Returns the highest index of sub within [start, end], raising an error if not found.
Show parameters info
value
str
required
Value to search for.
start
int
required
Start index for searching.
end
int
required
End index for searching.
rjust
(length, character) -> str
Right justifies the string within the specified width, padding with the fill character. Returns the original string if width is less than or equal to its length.
Show parameters info
length
int
required
Length of the result string.
character
str
default:" "
Fill character.
rpartition
(s) -> list[str]
Splits the string at the last occurrence of sep and returns a list with the parts before, the separator, and after.
Show parameters info
s
str
required
String separator value.
rsplit
(separator, maxsplit) -> list[str]
Splits the string into words using sep as the delimiter, with an optional maxsplit from the right.
Show parameters info
separator
str
default:" "
String separator value.
maxsplit
int
default:-1
Number of splits.
rstrip
(symbols) -> str
Returns a copy of the string with trailing characters removed.
Show parameters info
symbols
str
default:" "
Characters to remove.
split
(separator, maxsplit) -> list[str]
Splits the string into words using sep as the delimiter, with at most maxsplit splits, resulting in up to maxsplit+1 elements.
Show parameters info
separator
str
default:" "
String separator value.
maxsplit
int
default:-1
Number of splits.
startswith
(value, start, end) -> bool
Returns True if string starts with the prefix, otherwise False.
Show parameters info
value
str
required
Value to check if the beginning of the string equals.
start
int
required
Start index to check the beginning of the string.
end
int
required
End index to check the beginning of the string.
strip
(symbols) -> str
Returns a string with the leading and trailing characters removed.
Show parameters info
symbols
str
default:" "
Characters to remove.
swapcase
() -> str
Returns a copy of the string with case swapped.
upper
() -> str
Returns a copy of the string with all cased characters in uppercase.
Example
# examples of slices extraction:a = '01234567'b = a[2:5] # `b` is '234'c = a[:5] # `c` is '01234'd = a[2:] # `d` is '234567'e = a[:] # `e` is a copy of `a`f = a[1:7:2] # `f` is '135'g = a[5:2:-1] # `g` is '543'h = a[5::-1] # `h` is '543210'i = a[::-1] # `i` is '76543210'