functions that do string manipulation
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "str_manip.h"
|
int | str_isascii (char *s) |
| return nonzero iff all elements in the string are in the ASCII set.
|
|
int | strindex (char *s, char *t) |
| returns index of t in s (start, first occurence) More...
|
|
int | count_char (char *str, char sep) |
| returns the # of occurences of char c in string s
|
|
int | strindexC (char *s, char sep) |
| returns index of t in s (start, first occurence) More...
|
|
Split | strsplit (char *str, char sep) |
| Separates strings by a separator. More...
|
|
functions that do string manipulation
- Author
- Paula Perez paula.nosp@m.pere.nosp@m.zrubi.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om
- Date
- 03.08.2017
◆ __isascii_c
#define __isascii_c |
( |
|
c | ) |
(((c) & ~0x7f) == 0) |
◆ strindex()
int strindex |
( |
char * |
s, |
|
|
char * |
t |
|
) |
| |
returns index of t in s (start, first occurence)
- Parameters
-
s | string to be checked. |
t | substring to be found in s. |
◆ strindexC()
int strindexC |
( |
char * |
s, |
|
|
char |
sep |
|
) |
| |
returns index of t in s (start, first occurence)
- Parameters
-
s | string to be checked. |
sep | char, separator |
◆ strsplit()
Split strsplit |
( |
char * |
str, |
|
|
char |
sep |
|
) |
| |
Separates strings by a separator.
- Parameters
-
str | input string |
sep | separator (char) |
- Returns
- array of strings containing the substrings in the input separated