FastqPuri
Macros | Functions
str_manip.c File Reference

functions that do string manipulation More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "str_manip.h"
Include dependency graph for str_manip.c:

Macros

#define __isascii_c(c)   (((c) & ~0x7f) == 0)
 

Functions

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...
 

Detailed Description

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

Macro Definition Documentation

◆ __isascii_c

#define __isascii_c (   c)    (((c) & ~0x7f) == 0)

If C is a 7 bit value.

Function Documentation

◆ strindex()

int strindex ( char *  s,
char *  t 
)

returns index of t in s (start, first occurence)

Parameters
sstring to be checked.
tsubstring to be found in s.

◆ strindexC()

int strindexC ( char *  s,
char  sep 
)

returns index of t in s (start, first occurence)

Parameters
sstring to be checked.
sepchar, separator

◆ strsplit()

Split strsplit ( char *  str,
char  sep 
)

Separates strings by a separator.

Parameters
strinput string
sepseparator (char)
Returns
array of strings containing the substrings in the input separated