String routines to complement <string> && <cstring>:
Macros | Functions
string_tool_test.cpp File Reference

Programa de prueba para las rutinas de string_tool.h. More...

#include "uUnit.h"
#include <iostream>
#include "string_tool.h"
#include "psz_string.h"

Go to the source code of this file.

Macros

#define exec_TEST(t)   void t(); t();
 
#define roundUp(n, b)   ( (b)==0 ? (n) : ( ((n)+(b)-1) - (((n)-1)%(b)) ) )
 

Functions

int main (int argc, const char *argv[])
 Programa de prueba para las rutinas de string_tool.h. More...
 
void test_trimQuote ()
 test->trimQuote(). More...
 
void test_tolower ()
 test->tolower(). More...
 
void test_removeAccented ()
 test->removeAccented() && test->removeAccented::string() More...
 
void test_isalpha ()
 test->isalpha(). More...
 
void test_is_blank ()
 test->is_blank(). More...
 
void test_digitCount ()
 test->digitCount(). More...
 
void test_alphaCount ()
 test->alphaCount(). More...
 
void test_roundUp ()
 test->roundUp(). More...
 
void test_issuffix ()
 test->issuffix(). More...
 
void test_str2uint ()
 test->str2uint(). More...
 
void test_number_suffix ()
 
void test_tostring ()
 test->tostring(). More...
 
void test_tostring_char ()
 test->tostring_char(). More...
 
void test_is_email ()
 test->is_email(). More...
 
void test_tokens ()
 test->tokens(). More...
 
char * strins (const char *substr, char *num, int n)
 
char * strdel3_slow (char *str, int start, int len)
 
char * strdel_yang (char *str, int n, int l)
 
void test_strdel ()
 test->strdel() More...
 
void test_strdel2 ()
 test->strdel2() More...
 

Detailed Description

Programa de prueba para las rutinas de string_tool.h.

Author
Adolfo Di Mare adolf.nosp@m.o@di.nosp@m.-mare.nosp@m..com
Date
2012

Definition in file string_tool_test.cpp.

Macro Definition Documentation

◆ exec_TEST

#define exec_TEST (   t)    void t(); t();

◆ roundUp

#define roundUp (   n,
 
)    ( (b)==0 ? (n) : ( ((n)+(b)-1) - (((n)-1)%(b)) ) )

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Programa de prueba para las rutinas de string_tool.h.

Simple macro to define && execute a test

Definition at line 17 of file string_tool_test.cpp.

◆ test_trimQuote()

void test_trimQuote ( )

test->trimQuote().

Definition at line 48 of file string_tool_test.cpp.

◆ test_tolower()

void test_tolower ( )

test->tolower().

Definition at line 66 of file string_tool_test.cpp.

◆ test_removeAccented()

void test_removeAccented ( )

test->removeAccented() && test->removeAccented::string()

Definition at line 80 of file string_tool_test.cpp.

◆ test_isalpha()

void test_isalpha ( )

test->isalpha().

Definition at line 152 of file string_tool_test.cpp.

◆ test_is_blank()

void test_is_blank ( )

test->is_blank().

Definition at line 163 of file string_tool_test.cpp.

◆ test_digitCount()

void test_digitCount ( )

test->digitCount().

Definition at line 171 of file string_tool_test.cpp.

◆ test_alphaCount()

void test_alphaCount ( )

test->alphaCount().

Definition at line 201 of file string_tool_test.cpp.

◆ test_roundUp()

void test_roundUp ( )

test->roundUp().

Rounding up to the nearest multiple of a number.

Definition at line 221 of file string_tool_test.cpp.

◆ test_issuffix()

void test_issuffix ( )

test->issuffix().

Definition at line 259 of file string_tool_test.cpp.

◆ test_str2uint()

void test_str2uint ( )

test->str2uint().

Definition at line 302 of file string_tool_test.cpp.

◆ test_number_suffix()

void test_number_suffix ( )

Definition at line 312 of file string_tool_test.cpp.

◆ test_tostring()

void test_tostring ( )

test->tostring().

Definition at line 329 of file string_tool_test.cpp.

◆ test_tostring_char()

void test_tostring_char ( )

test->tostring_char().

Definition at line 343 of file string_tool_test.cpp.

◆ test_is_email()

void test_is_email ( )

test->is_email().

Definition at line 359 of file string_tool_test.cpp.

◆ test_tokens()

void test_tokens ( )

test->tokens().

Definition at line 378 of file string_tool_test.cpp.

◆ strins()

char* strins ( const char *  substr,
char *  num,
int  n 
)

Definition at line 571 of file string_tool_test.cpp.

◆ strdel3_slow()

char* strdel3_slow ( char *  str,
int  start,
int  len 
)

Definition at line 580 of file string_tool_test.cpp.

◆ strdel_yang()

char* strdel_yang ( char *  str,
int  n,
int  l 
)

Definition at line 599 of file string_tool_test.cpp.

◆ test_strdel()

void test_strdel ( )

test->strdel()

Definition at line 622 of file string_tool_test.cpp.

◆ test_strdel2()

void test_strdel2 ( )

test->strdel2()

Definition at line 667 of file string_tool_test.cpp.