![]() |
WIZlib Library API
ver 1.0
WIZlib Library API User Menual
|
Utilities for common use. More...
|
Modules | |
| Alarm | |
| Event Alarm Module. | |
| Base64 | |
| Base64 Codec. | |
| Macro Util | |
| Simple Macro Utilities. | |
Functions | |
| int8 | digit_length (int32 dgt, int8 base) |
| Count digit's letter Ex) digit_length(12345, 10) : This will return 5. More... | |
| int32 | str_check (int(*method)(int), int8 *str) |
| Check string with standard library method. More... | |
| int8 * | strsep (register int8 **stringp, register const int8 *delim) |
| Separate string into small peace by delimiter like strtok. More... | |
| void | print_dump (void *buf, uint16 len) |
| Print Binary Dump Data. More... | |
| uint16 | checksum (uint8 *src, uint32 len) |
| Calculate checksum of a stream. More... | |
Utilities for common use.
| uint16 checksum | ( | uint8 * | src, |
| uint32 | len | ||
| ) |
| int8 digit_length | ( | int32 | dgt, |
| int8 | base | ||
| ) |
| void print_dump | ( | void * | buf, |
| uint16 | len | ||
| ) |
| int32 str_check | ( | int(*)(int) | method, |
| int8 * | str | ||
| ) |
Check string with standard library method.
Below is the method you can use.
Ex) str_check(isdigit, "12345") : This will return RET_OK.
Ex) str_check(islower, "AbcDe") : This will return RET_NOK.
| method | The method to use for check |
| str | The string to check |
Definition at line 233 of file util.c.

| int8* strsep | ( | register int8 ** | stringp, |
| register const int8 * | delim | ||
| ) |
Separate string into small peace by delimiter like strtok.
But if the input string contains more than one character from delimiter
in a row, strsep returns an empty string for each pair of characters from delimiter.
Ex) strsep("a,b,c,,,f,gh", ",") : When meet ,,, strtok returns 'f' but this returns NULL.
| stringp | String to separate |
| delim | Delimiter |
1.8.3.1