OpenRTM-aist-Python 1.1.2
|
String operation utility. More...
Classes | |
class | OpenRTM_aist.StringUtil.escape_functor |
class | OpenRTM_aist.StringUtil.unescape_functor |
class | OpenRTM_aist.StringUtil.unique_strvec |
Functions | |
def | OpenRTM_aist.StringUtil.isEscaped (_str, pos) |
Whether the character is escaped or not. More... | |
def | OpenRTM_aist.StringUtil.escape (_str) |
Escape string. More... | |
def | OpenRTM_aist.StringUtil.unescape (_str) |
Unescape string. More... | |
def | OpenRTM_aist.StringUtil.eraseBlank (str) |
Erase blank characters of string. More... | |
def | OpenRTM_aist.StringUtil.eraseHeadBlank (_str) |
Erase the head blank characters of string. | |
def | OpenRTM_aist.StringUtil.eraseTailBlank (_str) |
Erase the tail blank characters of string. | |
def | OpenRTM_aist.StringUtil.replaceString (str, _from, _to) |
Replace string. | |
def | OpenRTM_aist.StringUtil.split (input, delimiter) |
Split string by delimiter. | |
def | OpenRTM_aist.StringUtil.toBool (_str, yes, no, default_value=None) |
Convert given string to bool value. | |
def | OpenRTM_aist.StringUtil.includes (_list, value, ignore_case=True) |
Include if a string is included in string list. More... | |
def | OpenRTM_aist.StringUtil.isAbsolutePath (str) |
Investigate whether the given string is absolute path or not. | |
def | OpenRTM_aist.StringUtil.isURL (str) |
Investigate whether the given string is URL or not. | |
def | OpenRTM_aist.StringUtil.otos (n) |
Convert the given object to st::string. | |
def | OpenRTM_aist.StringUtil.stringTo (_type, _str) |
Convert the given object to st::string. | |
def | OpenRTM_aist.StringUtil.flatten (sv, delimiter=") |
Create CSV file from the given string list. More... | |
String operation utility.
Copyright (C) 2003-2008 Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.
def OpenRTM_aist.StringUtil.eraseBlank | ( | str | ) |
Erase blank characters of string.
Erase blank characters that exist at the head of the given string. Space ' 'and tab '\t' are supported as the blank character.
str | The target blank characters of string for the erase |
def OpenRTM_aist.StringUtil.escape | ( | _str | ) |
Escape string.
The following characters are converted.
HT -> "\t"
LF -> "\n"
CR -> "\r"
FF -> "\f"
Single quote and dobule quote are not processed.
def OpenRTM_aist.StringUtil.flatten | ( | sv, | |
delimiter = " |
|||
) |
Create CSV file from the given string list.
Create CSV that arranged each element of the character string list given by the argument. If the string list is empty, the null will be returned.
sv | The target string list for creating CSV |
delimiter | Delimiter string between connected words (default: ",") |
def OpenRTM_aist.StringUtil.includes | ( | _list, | |
value, | |||
ignore_case = True |
|||
) |
Include if a string is included in string list.
if the second argument is included in the comma separated string list of the first argument, This operation returns "true value".
list | The target comma separated string |
value | The searched string |
bool includes(const vstring& list, std::string value, bool ignore_case = true);
def OpenRTM_aist.StringUtil.isEscaped | ( | _str, | |
pos | |||
) |
Whether the character is escaped or not.
This operation returns true if the specified character is escaped, and if the specified character is not escaped, it returns false
str | The string thath includes the character to be investigated. |
pos | The position of the character to be investigated. |
def OpenRTM_aist.StringUtil.unescape | ( | _str | ) |
Unescape string.
The following characters are converted.
"\t" -> HT
"\n" -> LF
"\r" -> CR
"\f" -> FF
"\'" -> '
"\"" -> "