Change slice functions to have proper naming
This commit is contained in:
parent
999a0e3c18
commit
44c9833117
3 changed files with 3 additions and 4 deletions
3
TODO.md
3
TODO.md
|
|
@ -1,3 +1,2 @@
|
||||||
# TODO
|
# TODO
|
||||||
Change all string slice functions to start with lz_slc
|
Make examples for slc and sb atoi,atof,atol, and atoll
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ int main() {
|
||||||
Lz_Slc word;
|
Lz_Slc word;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
do {
|
do {
|
||||||
lz_split_slc_typ(&s, isnotalpha, &word);
|
lz_slc_split_typ(&s, isnotalpha, &word);
|
||||||
printf("Word %d: "LZ_STR_FMT"\n", i, LZ_STR_PRINTF(word));
|
printf("Word %d: "LZ_STR_FMT"\n", i, LZ_STR_PRINTF(word));
|
||||||
++i;
|
++i;
|
||||||
} while(s.cnt != 0);
|
} while(s.cnt != 0);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ int main() {
|
||||||
Lz_Slc s = lz_cstr_to_slc(src);
|
Lz_Slc s = lz_cstr_to_slc(src);
|
||||||
|
|
||||||
printf("|"LZ_STR_FMT"|\n", LZ_STR_PRINTF(s));
|
printf("|"LZ_STR_FMT"|\n", LZ_STR_PRINTF(s));
|
||||||
lz_trim_typ(&s, isspace);
|
lz_slc_trim_typ(&s, isspace);
|
||||||
printf("|"LZ_STR_FMT"|\n", LZ_STR_PRINTF(s));
|
printf("|"LZ_STR_FMT"|\n", LZ_STR_PRINTF(s));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue