Overview
This section describes string functions, including their syntax, parameters, and usage examples.
Function List
Type |
Function |
Description |
---|---|---|
Multi-string operations |
Formats a string in a specified format. |
|
Generates a new string by connecting the input strings using a connector. |
||
Splits the strings of two values or expressions concurrently and then combines them into one string. |
||
Sorting, inversion, and replacement |
Sorts strings. |
|
Reverses a string. |
||
Replaces an old string with a new string according to rules. |
||
Replaces specified characters in a string based on the mapping. |
||
Common operations |
Deletes specified characters from a string. |
|
Deletes specified characters at the beginning of a string. |
||
Deletes specified characters at the end of a string. |
||
Converts all uppercase characters in a string to lowercase characters. |
||
Converts all lowercase characters in a string to uppercase characters. |
||
Converts the first letter of each word in a string to uppercase and the other letters to lowercase. |
||
Converts the first letter of a string to uppercase and the other letters to lowercase. |
||
Converts the uppercase and lowercase letters of a string. |
||
Search and judgment |
Calculates the number of occurrences of a character in a string. |
|
Checks whether the original string contains the specified substring. |
||
Searches for the last occurrence of specified characters a string. |
||
Checks whether a string ends with a specified suffix. |
||
Checks whether a string starts with specified characters. |
||
Splitting |
Splits a string by specifying delimiters. |
|
Splits a string by specifying newline characters. |
||
Splits a string into three parts from left to right based on the specified delimiters. |
||
Splits a string into three parts from right to left based on the specified delimiters. |
||
Format |
Expands a string to a specified length with specified characters. |
|
Expands a string to a specified length with specified characters starting from the end of the string. |
||
Expands a string to a specified length with specified characters starting from the beginning of the string. |
||
Expands a string to a specified length with the character 0 starting from the beginning of the string. |
||
Converts \t in a string to a space. |
||
Character set check |
Checks whether a string consists of only letters and digits. |
|
Checks whether a string consists of only letters. |
||
Validates whether a string contains only ASCII characters. |
||
Checks whether a string consists of only decimal characters. |
||
Checks whether a string consists of only digits. |
||
Checks whether a string is a valid Python identifier. |
||
Checks whether a string consists of only lowercase letters. |
||
Checks whether a string consists of only digits. |
||
Checks whether all characters in a string are printable characters. |
||
Checks whether a string consists of only space characters. |
||
Checks whether the first letter of each word in a string is uppercase and whether other letters are lowercase. |
||
Checks whether all letters in a string are uppercase. |
||
Randomly generates a UUID. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot