ROS Code
 All Classes Namespaces Files Functions Variables
ros.string Namespace Reference

Functions

def catwalk
 
def converttabs
 
def shortentext
 
def wraptext
 
def unindent
 
def paraspace
 
def randomstr
 
def case
 

Function Documentation

def ros.string.case (   text,
  format = 'sentence' 
)
Change the casing of some text

text:
The text to change the casing of

format:
The format of casing to apply to the text. Default is sentence.

Definition at line 103 of file string.py.

def ros.string.catwalk (   text)
Replace multiple spaces with a single space
For example replace 'this  is    a long  sentence' with 'this is a long sentence'

text:
Specify the text to fix

Definition at line 1 of file string.py.

def ros.string.converttabs (   text,
  spaces = 4 
)
Convert all the tabs to a specific amount of spaces

text:
The text to convert tabs to spaces on

spaces:
The amount of spaces to replace tabs to. Default is 4.

Definition at line 15 of file string.py.

def ros.string.paraspace (   paragraphspaces = 1)
Print 1 or more paragraph spaces in the terminal output

paragraphspaces:
The amount of paragraph spaces to print. Default is 1.

Definition at line 79 of file string.py.

def ros.string.randomstr (   valuelist)

Definition at line 96 of file string.py.

def ros.string.shortentext (   text,
  minlength,
  placeholder = '...' 
)
Shorten some text by replacing the last part with a placeholder (such as '...')

text:
The text to shorten

minlength:
The minimum length before a shortening will occur

placeholder:
The text to append after removing protruding text. Default is '...'.

Definition at line 31 of file string.py.

def ros.string.unindent (   text)
Remove indention for some text

text:
The text to unindent

Definition at line 66 of file string.py.

def ros.string.wraptext (   text,
  maxlength 
)
Wrap text around the execution window according to a given size

text:
The text to be wraped

maxlength:
The amount of text until a wrap will be added

Definition at line 50 of file string.py.