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
0a0852b5
Commit
0a0852b5
authored
7 years ago
by
Бобби
Committed by
Cesanta Bot
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document mg_match_prefix
PUBLISHED_FROM=b85fe1ee1e7bae4528c1240d8531c410728d0709
parent
90716417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
mongoose.h
mongoose.h
+16
-2
No files found.
mongoose.h
View file @
0a0852b5
...
@@ -2171,10 +2171,24 @@ struct mg_str mg_next_comma_list_entry_n(struct mg_str list, struct mg_str *val,
...
@@ -2171,10 +2171,24 @@ struct mg_str mg_next_comma_list_entry_n(struct mg_str list, struct mg_str *val,
/*
/*
* Matches 0-terminated string (mg_match_prefix) or string with given length
* Matches 0-terminated string (mg_match_prefix) or string with given length
* mg_match_prefix_n against a glob pattern.
* mg_match_prefix_n against a glob pattern. Glob syntax:
*
* ```
* - * matches zero or more characters until a slash character /
* - ** matches zero or more characters
* - ? Matches exactly one character which is not a slash /
* - | or , divides alternative patterns
* - any other character matches itself
* ```
* Match is case-insensitive. Returns number of bytes matched, or -1 if no
* Match is case-insensitive. Returns number of bytes matched, or -1 if no
* match.
* match.
* Examples:
* ```
* mg_match_prefix("a*f", len, "abcdefgh") == 6
* mg_match_prefix("a*f", len, "abcdexgh") == -1
* mg_match_prefix("a*f|de*,xy", len, "defgh") == 5
* mg_match_prefix("?*", len, "abc") == 3
* mg_match_prefix("?*", len, "") == -1
* ```
*/
*/
int
mg_match_prefix
(
const
char
*
pattern
,
int
pattern_len
,
const
char
*
str
);
int
mg_match_prefix
(
const
char
*
pattern
,
int
pattern_len
,
const
char
*
str
);
int
mg_match_prefix_n
(
const
struct
mg_str
pattern
,
const
struct
mg_str
str
);
int
mg_match_prefix_n
(
const
struct
mg_str
pattern
,
const
struct
mg_str
str
);
...
...
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