Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otStringList Class Reference
[String List - Class for string list managementString List - Class for string list management]

Class for string list management.

#include <otStringList.h>


Public Member Functions

 otStringList ()
void append (const char *str)
void append (otString &str)
bool insert (U32 pos, const char *str)
 Insert a string at the specified position.
bool insert (U32 pos, otString &str)
 Insert a string at the specified position.
bool remove (U32 pos)
 Remove selected string.
otString join (const char *sep)
 Joins all the string list's strings into a single string with each element separated by the given separator (which can be an empty string).
U32 size ()
 Returns the number of items in the list.
int indexOf (const char *str_find, U32 initial_position=0)
 Returns the index position of the first occurrence of value in the list, searching forward from index position from. Returns -1 if no item matched.
int indexOf (otString &str_find, U32 initial_position=0)
 Returns the index position of the first occurrence of value in the list, searching forward from index position from. Returns -1 if no item matched.
void sort ()
 Sorts the list of strings in ascending order (case sensitively).
otString at (U32 pos)
 Read an item at the specified index.
const char * cstr (U32 pos)
 Read an item at the specified index.
void close ()
 Free all allocated memory e set the size to 0.


Constructor & Destructor Documentation

otStringList.otStringList  ) 
 

Create an empty class


Member Function Documentation

void otStringList.append otString str  ) 
 

Append a string to the list

Parameters:
str String to append

void otStringList.append const char *  str  ) 
 

Append a string to the list

Parameters:
str String to append

otString otStringList.at U32  pos  ) 
 

Parameters:
pos Index in the list
Returns:
Output string class

void otStringList.close  ) 
 

const char* otStringList.cstr U32  pos  ) 
 

Parameters:
pos Index in the list
Returns:
Output C string

int otStringList.indexOf otString str_find,
U32  initial_position = 0
 

Parameters:
str_find String to be searched
initial_position Start position
Returns:
Found position

int otStringList.indexOf const char *  str_find,
U32  initial_position = 0
 

Parameters:
str_find String to be searched
initial_position Start position
Returns:
Found position

bool otStringList.insert U32  pos,
otString str
 

Parameters:
pos Position in the list
str String to be inserted
Returns:
True on success

bool otStringList.insert U32  pos,
const char *  str
 

Parameters:
pos Position in the list
str String to be inserted
Returns:
True on success

otString otStringList.join const char *  sep  ) 
 

Parameters:
sep Separator to be used
Returns:
Output string

bool otStringList.remove U32  pos  ) 
 

Parameters:
pos Position in the list
Returns:
True on success

U32 otStringList.size  ) 
 

Returns:
Items count

void otStringList.sort  ) 
 


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0