Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

StringUtil.py File Reference

String operation utility. More...

#include "string.py"

Classes

class  escape_functor
 A fanctor to escape string. More...
class  unescape_functor
 The functor to unescape string. More...
class  Toupper
 A functor to convert to capital letter. More...
class  unique_strvec

Functions

 isEscaped (_str, pos)
 Whether the character is escaped or not.
 for_each (_str, instance)
 escape (_str)
 Escape string.
 unescape (_str)
 Unescape string.
 eraseHeadBlank (_str)
 Erase the head blank characters of string.
 eraseTailBlank (_str)
 Erase the tail blank characters of string.
 replaceString (str, _from, _to)
 Replace string.
 split (input, delimiter)
 Split string by delimiter.
 toBool (_str, yes, no, default_value=None)
 Convert given string to bool value.
 isAbsolutePath (str)
 Investigate whether the given string is absolute path or not.
 isURL (str)
 Investigate whether the given string is URL or not.
 otos (n)
 Convert the given object to st::string.
 _stringToList (_type, _str)
 stringTo (_type, _str)
 unique_sv (sv)
 flatten (sv)
 toArgv (args)


Detailed Description

String operation utility.

Date:
Date
Author:
Noriaki Ando <n-ando@aist.go.jp> and Shinji Kurihara
Copyright (C) 2003-2005 Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

Function Documentation

_stringToList _type  ,
_str 
 

eraseHeadBlank _str   ) 
 

Erase the head blank characters of string.

eraseTailBlank _str   ) 
 

Erase the tail blank characters of string.

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.

flatten sv   ) 
 

for_each _str  ,
instance 
 

isAbsolutePath str   ) 
 

Investigate whether the given string is absolute path or not.

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

Parameters:
str The string thath includes the character to be investigated.
pos The position of the character to be investigated.
Returns:
true: the character is escaped, false: the character is not escaped.

isURL str   ) 
 

Investigate whether the given string is URL or not.

otos  ) 
 

Convert the given object to st::string.

replaceString str  ,
_from  ,
_to 
 

Replace string.

split input  ,
delimiter 
 

Split string by delimiter.

stringTo _type  ,
_str 
 

toArgv args   ) 
 

toBool _str  ,
yes  ,
no  ,
default_value  = None
 

Convert given string to bool value.

unescape _str   ) 
 

Unescape string.

The following characters are converted.
"\t" -> HT
"\n" -> LF
"\r" -> CR
"\f" -> FF
"\'" -> '
"\"" -> "

unique_sv sv   ) 
 


Generated on Mon Oct 29 15:51:43 2007 for OpenRTM by  doxygen 1.4.3