INGOR
Loading...
Searching...
No Matches
util
ytStr.h
1
/*
2
util/ytStr.{h,c} : String related utility routines.
3
Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4
All rights reserved.
5
6
See LICENSE.txt for details of the licensing agreement.
7
*/
8
9
#ifndef __YTLIB_STR_H
10
#define __YTLIB_STR_H
11
12
#include <stdlib.h>
13
14
#include "ytStrArray.h"
15
#include "ytIntArray.h"
16
17
char
* ytStr_substr(
const
char
* str,
size_t
length);
18
char
* ytStr_substr2(
const
char
* str,
const
char
* end);
19
char
* ytStr_trim(
char
* str);
20
#ifdef YTLIB_MEMCHECK
21
#define ytStr_copy(x) ytStr_copym(x,__FILE__,__LINE__)
22
char
* ytStr_copym(
const
char
* str,
const
char
* file,
int
line);
23
#else
24
char
* ytStr_copy(
const
char
* str);
25
#endif
26
27
size_t
ytStr_size(
const
char
* value);
28
void
ytStr_serialize(
const
char
* value, ytByte ** pptr);
29
char
* ytStr_deserialize(ytByte ** ptr);
30
ytStrArray
* ytStr_split(
char
* str,
const
char
delim,
ytStrArray
* ar);
31
ytIntArray
* ytStr_splitPos(
char
* str,
const
char
delim,
ytIntArray
* ar);
32
int
ytStr_debug(
int
argc,
char
* argv[]);
33
34
#ifdef _WIN64
35
#include <string.h>
36
#define ytStr_strcasecmp(s1,s2) _stricmp(s1,s2)
37
#else
38
#include <strings.h>
39
#define ytStr_strcasecmp(s1,s2) strcasecmp(s1,s2)
40
#endif
41
42
#endif
/* __YTLIB_STR_H */
ytIntArray
Expandable array.
ytStrArray
Expandable array.
Generated by
1.9.8