sscanf

来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· 代码 · 共 34 行

TXT
34
字号
     ssssssssccccaaaannnnffff((((3333))))              MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444))))               ssssssssccccaaaannnnffff((((3333))))     NNNNAAAAMMMMEEEE          sscanf() - match substrings in a string.     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS          int sscanf( string str, string fmt,                      mixed var1, mixed var2 ... );     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN          Parse a string `str' using the format `fmt'. `fmt' can          contain strings separated by "%d" and "%s". Every "%d" and          "%s" corresponds to one of `var1', `var2'...  "%d" will give          a number, and "%s" will give a string.  The * may be used in          a format specifier (e.g. %*d and %*s) to allow integers or          strings (respectively) to be skipped over in the input          string (without being assigned to a variable).  The LPC          sscanf() is similar to its C counterpart however it does          behave somewhat differently.  It is not necessary (or          possible) to pass the address of variables into sscanf          (simply pass the name of the variable).  Another difference          is that in the LPC sscanf(), sscanf(str, "%s %s", str1,          str2) will parse the first word in str into str1 and the          remainder of str into str2.          The number of matched "%d" and "%s" is returned.     SSSSEEEEEEEE AAAALLLLSSSSOOOO          explode(3), replace_string(3), strsrch(3)     Page 1                                          (printed 3/16/95)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?