Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
be63c0dc
Commit
be63c0dc
authored
7 years ago
by
Dmitry Frank
Committed by
Cesanta Bot
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve docs
PUBLISHED_FROM=3b75fd8247ba9028e0ef0c3e211e7c1a80013951
parent
987bc1d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
mongoose.h
mongoose.h
+15
-1
No files found.
mongoose.h
View file @
be63c0dc
...
@@ -1862,10 +1862,14 @@ struct mg_str {
...
@@ -1862,10 +1862,14 @@ struct mg_str {
};
};
/*
/*
* Helper function
s
for creating mg_str struct from plain C string.
* Helper function for creating mg_str struct from plain C string.
* `NULL` is allowed and becomes `{NULL, 0}`.
* `NULL` is allowed and becomes `{NULL, 0}`.
*/
*/
struct
mg_str
mg_mk_str
(
const
char
*
s
);
struct
mg_str
mg_mk_str
(
const
char
*
s
);
/*
* Like `mg_mk_str`, but takes string length explicitly.
*/
struct
mg_str
mg_mk_str_n
(
const
char
*
s
,
size_t
len
);
struct
mg_str
mg_mk_str_n
(
const
char
*
s
,
size_t
len
);
/* Macro for initializing mg_str. */
/* Macro for initializing mg_str. */
...
@@ -1900,9 +1904,19 @@ struct mg_str mg_strdup_nul(const struct mg_str s);
...
@@ -1900,9 +1904,19 @@ struct mg_str mg_strdup_nul(const struct mg_str s);
*/
*/
const
char
*
mg_strchr
(
const
struct
mg_str
s
,
int
c
);
const
char
*
mg_strchr
(
const
struct
mg_str
s
,
int
c
);
/*
* Compare two `mg_str`s; return value is the same as `strcmp`.
*/
int
mg_strcmp
(
const
struct
mg_str
str1
,
const
struct
mg_str
str2
);
int
mg_strcmp
(
const
struct
mg_str
str1
,
const
struct
mg_str
str2
);
/*
* Like `mg_strcmp`, but compares at most `n` characters.
*/
int
mg_strncmp
(
const
struct
mg_str
str1
,
const
struct
mg_str
str2
,
size_t
n
);
int
mg_strncmp
(
const
struct
mg_str
str1
,
const
struct
mg_str
str2
,
size_t
n
);
/*
* Finds the first occurrence of a substring `needle` in the `haystack`.
*/
const
char
*
mg_strstr
(
const
struct
mg_str
haystack
,
const
struct
mg_str
needle
);
const
char
*
mg_strstr
(
const
struct
mg_str
haystack
,
const
struct
mg_str
needle
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment