String Function

string function

tools.string.replace_by_dict(source_string, mapping)

replace string by dictionary

Parameters:
  • source_string (string) –
  • mapping (dict) –
Returns:

return_string

Return type:

string

tools.string.strip_whitespace(source_string)

replace all space character in source_string

Parameters:source_string (string) –
Returns:return_string
Return type:string
tools.string.strip_whitespace_include_newline(source_string)

replace all space character in source_string include n r and t

Parameters:source_string (string) –
Returns:return_string
Return type:string