48 while pos >= 0
and _str[pos] ==
"\\":
96 if not (self.
count % 2):
132 if self._str.count(s) == 0:
133 return self._str.append(s)
226 str[0] = str[0].strip(
" ")
227 l_str = str[0].
split(
" ")
231 tmp_str+=s.strip(
" ")
233 tmp_str = tmp_str.strip(
'\t')
234 l_str = tmp_str.split(
'\t')
238 tmp_str+=s.strip(
'\t')
256 _str[0] = _str[0].lstrip(
'\t ')
276 while (_str[0][-1] ==
" " or _str[0][-1] ==
'\t')
and not isEscaped(_str[0], len(_str[0]) - 1):
277 _str[0] = _str[0][:-1]
288 _str[0] = _str[0].strip().lower()
306 str[0] = str[0].replace(_from, _to)
327 del_result = input.split(delimiter)
329 len_ = len(del_result)
332 for i
in range(len_):
333 if del_result[i] ==
"" or del_result[i] ==
" ":
336 str_ = [del_result[i]]
339 result.append(str_[0])
360 def toBool(_str, yes, no, default_value=None):
361 if default_value
is None:
368 if _str.find(yes) != -1:
370 elif (_str.find(no)) != -1:
401 if not (type(_list) == list
or type(_list) == str):
404 if type(_list) == str:
405 _list = _list.split(
",")
409 value = value.lower()
410 tmp_list = map((
lambda x: x.lower()),_list)
412 if tmp_list.count(value) > 0:
439 if str[0].isalpha()
and str[1] ==
":" and str[2] ==
"\\":
441 if str[0] ==
"\\" and str[1] ==
"\\":
468 if pos != 0
and pos != -1
and str[pos+1] ==
"/" and str[pos+2] ==
"/":
488 if type(n) == int
or type(n) == str
or type(n) == long
or type(n) == float:
508 list_ =
split(_str,
",")
511 if len(_type[0]) < len(list_):
512 sub = len(list_) - len(_type[0])
514 _type[0].
append(_type[0][0])
515 elif len(_type[0]) > len(list_):
516 sub = len(_type[0]) - len(list_)
520 for i
in range(len_):
526 for i
in range(len(list_)):
527 if type(_type[0][i]) == int:
528 _type[0][i] = int(list_[i])
529 elif type(_type[0][i]) == long:
530 _type[0][i] = long(list_[i])
531 elif type(_type[0][i]) == float:
532 _type[0][i] = float(list_[i])
533 elif type(_type[0][i]) == str:
534 _type[0][i] = str(list_[i])
559 if type(_type[0]) == int:
562 elif type(_type[0]) == long:
563 _type[0] = long(_str)
565 elif type(_type[0]) == float:
566 _type[0] = float(_str)
568 elif type(_type[0]) == list:
570 elif type(_type[0]) == str:
def replaceString(str, _from, _to)
Replace string.
def eraseHeadBlank(_str)
Erase the head blank characters of string.
def split(input, delimiter)
Split string by delimiter.
def for_each(_str, instance)
def unescape(_str)
Unescape string.
def otos(n)
Convert the given object to st::string.
def stringTo(_type, _str)
Convert the given object to st::string.
def escape(_str)
Escape string.
def isEscaped(_str, pos)
Whether the character is escaped or not.
def isURL(str)
Investigate whether the given string is URL or not.
def eraseTailBlank(_str)
Erase the tail blank characters of string.
def isAbsolutePath(str)
Investigate whether the given string is absolute path or not.
def includes(_list, value, ignore_case=True)
Include if a string is included in string list.
def eraseBlank(str)
Erase blank characters of string.
def _stringToList(_type, _str)
def toBool(_str, yes, no, default_value=None)
Convert given string to bool value.