Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
6f41791e
Commit
6f41791e
authored
9 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/StringAPI: add UnsafeCopyStringP()
parent
0bacbcd0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
StringAPI.hxx
src/util/StringAPI.hxx
+13
-0
WStringAPI.hxx
src/util/WStringAPI.hxx
+13
-0
No files found.
src/util/StringAPI.hxx
View file @
6f41791e
...
...
@@ -101,6 +101,19 @@ UnsafeCopyString(char *dest, const char *src)
strcpy
(
dest
,
src
);
}
gcc_nonnull_all
static
inline
char
*
UnsafeCopyStringP
(
char
*
dest
,
const
char
*
src
)
{
#if defined(WIN32) || defined(__BIONIC__)
/* emulate stpcpy() */
UnsafeCopyString
(
dest
,
src
);
return
dest
+
StringLength
(
dest
);
#else
return
stpcpy
(
dest
,
src
);
#endif
}
/**
* Checks whether #a and #b are equal.
*/
...
...
This diff is collapsed.
Click to expand it.
src/util/WStringAPI.hxx
View file @
6f41791e
...
...
@@ -97,6 +97,19 @@ UnsafeCopyString(wchar_t *dest, const wchar_t *src)
wcscpy
(
dest
,
src
);
}
gcc_nonnull_all
static
inline
wchar_t
*
UnsafeCopyStringP
(
wchar_t
*
dest
,
const
wchar_t
*
src
)
{
#if defined(WIN32) || defined(__BIONIC__)
/* emulate wcpcpy() */
UnsafeCopyString
(
dest
,
src
);
return
dest
+
StringLength
(
dest
);
#else
return
wcpcpy
(
dest
,
src
);
#endif
}
/**
* Checks whether str1 and str2 are equal.
* @param str1 String 1
...
...
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