mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 14:15:46 +01:00
- Added wstrndup() and WMGetFontName()
This commit is contained in:
@@ -186,6 +186,21 @@ wstrdup(char *str)
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
wstrndup(char *str, size_t len)
|
||||
{
|
||||
char *copy;
|
||||
|
||||
assert(str!=NULL);
|
||||
|
||||
len = WMIN(len, strlen(str));
|
||||
copy = strncpy(wmalloc(len+1), str, len);
|
||||
copy[len] = 0;
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
wstrconcat(char *str1, char *str2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user