Skip to main content

Module str

Module str 

Source

Enums§

Quote
Enumeration of the two kinds of quotes that can be used for Python string/f/t-string/bytestring literals
TripleQuotes

Functions§

is_triple_quote
Return true if the string is a triple-quote string or byte prefix.
leading_quote
Return the leading quote for a string, template, or bytes literal (e.g., """).
raw_contents
Strip the leading and trailing quotes from a string. Assumes that the string is a valid string literal, but does not verify that the string is a “simple” string literal (i.e., that it does not contain any implicit concatenations).
trailing_quote
Return the trailing quote string for a string, template, or bytes literal (e.g., """).