PINE LIBRARY
Zaktualizowano String Extra Functions

Library "string_extras"
Additional String shortcuts, unshift and pop return the string ~without~ the first or last, so in use will still require to extract first or last character prior to overwriting a string with the output.
can be imported "as str" to work side by side with regular pine
last(_string)
last char of a string
Parameters:
_string
Returns: last char of a string
shift(_string)
string without first char
Parameters:
_string
Returns: string without first char
pop(_string)
string without last char
Parameters:
_string
Returns: string without last char
get(_string, _position)
get specific char of a string
Parameters:
_string
_position
Returns: string _string
push(_string, _char)
push to end of a string
Parameters:
_string
_char
Returns: string _string
unshift(_string, _char)
unshift char to prepend string
Parameters:
_string
_char
Returns: string _string
Additional String shortcuts, unshift and pop return the string ~without~ the first or last, so in use will still require to extract first or last character prior to overwriting a string with the output.
can be imported "as str" to work side by side with regular pine
last(_string)
last char of a string
Parameters:
_string
Returns: last char of a string
shift(_string)
string without first char
Parameters:
_string
Returns: string without first char
pop(_string)
string without last char
Parameters:
_string
Returns: string without last char
get(_string, _position)
get specific char of a string
Parameters:
_string
_position
Returns: string _string
push(_string, _char)
push to end of a string
Parameters:
_string
_char
Returns: string _string
unshift(_string, _char)
unshift char to prepend string
Parameters:
_string
_char
Returns: string _string
Informacje o Wersji
v2Added:
head(_string, _char, _include)
string from first char until input, if it exists, or itself, with option to cut off char
Parameters:
_string: String to process
_char: string
_include
Returns: string up until/including the dsired character
tail(_string, _char, _include)
string from last input char until end, if it exists, or itself with option to cut off char
Parameters:
_string: String to process
_char: string
_include
Returns: string up until/including the dsired character
Updated:
last(_string)
last char of a string
Parameters:
_string: String to process
Returns: last char of a string
shift(_string)
string without first char
Parameters:
_string: String to process
Returns: string without first char
pop(_string)
string without last char
Parameters:
_string: String to process
Returns: string without last char
get(_string, _position)
get specific char of a string
Parameters:
_string: String to process
_position: int
Returns: string _string
push(_string, _char)
push to end of a string
Parameters:
_string: String to process
_char: string
Returns: string _string
unshift(_string, _char)
unshift char to prepend string
Parameters:
_string: String to process
_char: string
Returns: string _string
Informacje o Wersji
v3Added:
index(_string, _char, _occurance)
returns the _occurabnce (1st, 2nd..) index of a character in a string if set , or last
Parameters:
_string: String to process
_char: string
_occurance
Returns: int index of character
Biblioteka Pine
W duchu TradingView autor opublikował ten kod Pine jako bibliotekę open-source, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla autora! Możesz używać tej biblioteki prywatnie lub w innych publikacjach open-source, ale ponowne wykorzystanie tego kodu w publikacjach podlega Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Biblioteka Pine
W duchu TradingView autor opublikował ten kod Pine jako bibliotekę open-source, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla autora! Możesz używać tej biblioteki prywatnie lub w innych publikacjach open-source, ale ponowne wykorzystanie tego kodu w publikacjach podlega Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.