📄 jstrcspn.gml
字号:
.func jstrcspn _fjstrcspn
#include <string.h>
size_t jstrcspn( const JCHAR *str,
const JCHAR *charset );
.ixfunc2 '&Jstring' &func
.ixfunc2 '&Jsearch' &func
.if &farfnc eq 1 .do begin
size_t __far _fjstrcspn( const JCHAR __far *str,
const JCHAR __far *charset );
.ixfunc2 '&Jstring' &ffunc
.ixfunc2 '&Jsearch' &ffunc
.do end
.funcend
.desc begin
.if &farfnc eq 0 .do begin
The &func function computes
.do end
.el .do begin
The &func and &ffunc functions compute
.do end
the length of the initial segment of the Kanji string pointed to by
.arg str
which consists entirely of characters
.us not
from the Kanji string pointed to by
.arg charset.
A double-byte character is treated as one character.
The terminating null character is not considered part of
.arg str.
.im ffarparm
.desc end
.return begin
The length of the initial segment is returned.
.return end
.see begin
.seelist &function. jstrcspn jstrspn strcspn strspn
.see end
.exmp begin
#include <stdio.h>
#include <jstring.h>
void main()
{
printf( "%d\n", jstrcspn( "abcbcadef", "cba" ) );
printf( "%d\n", jstrcspn( "xxxbcadef", "cba" ) );
printf( "%d\n", jstrcspn( "123456789", "cba" ) );
}
.exmp output
0
3
9
.exmp end
.class WATCOM
.system
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -