strpfx.txt
来自「dos 1.0 其中包含quick basic源代码、内存管理himem emm」· 文本 代码 · 共 41 行
TXT
41 行
SUMMARY Determine if one string is a prefix of another.
KEYWORDS strprefix striprefix
USAGE
#include <strpfx.h>
char* strprefix (
char* szTest,
char* szFull
);
char* striprefix (
char* szTest,
char* szFull
);
DESCRIPTION
strprefix and striprefix determine if the szTest argument is
a prefix of the szFull argument. Strprefix is case sensitive,
while striprefix is case insensitive.
RETURN VALUE
Both routines return NULL if szTest is not a prefix of szFull.
If szTest is a prefix of szFull, the returned pointer identifies
the first character of szFull beyond the match. Thus, if the
return is a pointer to a zero byte ('\0'), the szTest is an exact
match of szFull, not just a prefix.
EXAMPLE
strprefix ( "a", "arg" ); // pointer to "rg" returned
strprefix ( "a", "ARG" ); // NULL returned
striprefix ( "a", "ARG" ); // pointer to "RG" returned
striprefix ( "Arg", "ARG" ); // pointer to "" returned
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?