campy.util.strlib module¶
File: strlib.py¶
Exports a few useful string functions that are not included by default with Python strings.
-
campy.util.strlib.
quote_string
(string, force_quotes=True)[source]¶ Returns a copy of the string surrounded by double quotes, converting special characters to escape sequences, as necessary. If the optional parameter force is explicitly set to false, quotes are included in the output only if necessary.
TODO make this more pythonic TODO: bug: doesn’t print non-printing chars to JBE correctly
-
campy.util.strlib.
string_is_double
(string)¶
-
campy.util.strlib.
string_is_long
(string)¶ The following methods are included only for compatibility with the Stanford CPP Libraries They are redundant with builtin Python functionality, and should almost never be used.