Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

9.9. String functions

download PDF
The following are string functions you can use.

9.9.1. isinstr

General syntax:
isinstr:long (s1:string, s2:string)
This function returns 1 if string s1 contains string s2, otherwise zero.

9.9.2. strlen

General syntax:
strlen:long (str:string)
This function returns the number of characters in str.

9.9.3. strtol

General syntax:
strtol:long (str:string, base:long)
This function converts the string representation of a number to an integer. The base parameter indicates the number base to assume for the string (e.g. 16 for hex, 8 for octal, 2 for binary).

9.9.4. substr

General syntax:
substr:string (str:string, start:long, stop:long)
This function returns the substring of str starting from character position start and ending at character position stop.

9.9.5. text_str

General syntax:
text_str:string (input:string)
This function accepts a string argument. Any ASCII characters in the string that are not printable are replaced by a corresponding escape sequence in the returned string.

9.9.6. text_strn

General syntax:
text_strn:string (input:string, len:long, quoted:long)
This function accepts a string of length len. Any ASCII characters that are not printable are replaced by a corresponding escape sequence in the returned string. If quoted is not null, the function adds a backslash character to the output.

9.9.7. tokenize

General syntax:
tokenize:string (input:string, delim:string)
This function returns the next non-empty token in the given input string, where the tokens are delimited by characters in the delim string. If the input string is non-NULL, it returns the first token. If the input string is NULL, it returns the next token in the string passed in the previous call to tokenize. If no delimiter is found, the entire remaining input string is returned. It returns NULL when no more tokens are available.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.