<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                例子 ~~~ #include <iostream> #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <string.h> // 跳過數據 %*s, %*d void test01() { char *str = "12345abcde"; char buf[1024] = {0}; sscanf(str, "%*d%s", buf); printf("buf:%s\n", buf); } void test02() { //忽略字符串到空格或者\t char *str = "abcde\t123456"; char buf[1024] = {0}; sscanf(str, "%*s%s", buf); printf("buf:%s\n", buf); } void test03() { // %[a-z] 匹配a到z中任意字符(盡可能多的匹配) char *str = "12345abcde"; char buf[1024] = {0}; sscanf(str, "%*d%[a-c]", buf); printf("buf:%s\n", buf); } void test04() { //%[aBc] 匹配a、B、c中一員,貪婪性 char *str = "aABbcde"; char buf[1024] = {0}; sscanf(str, "%[aAb]", buf); printf("buf:%s\n", buf); } void test05() { //%[^a] 匹配非a的任意字符,貪婪性 char *str = "aABbcde"; char buf[1024] = {0}; sscanf(str, "%[^c]", buf); printf("buf:%s\n", buf); } void test06() { char *str = "aABbcde12345"; char buf[1024] = {0}; sscanf(str, "%[^0-9]", buf); printf("buf:%s\n", buf); } void test07() { char *ip = "127.0.0.1"; int num1 = 0, num2 = 0, num3 = 0, num4 = 0; //把ip錄入進去 sscanf(ip, "%d.%d.%d.%d", &num1, &num2, &num3, &num4); printf("num1:%d\n", num1); printf("num2:%d\n", num2); printf("num3:%d\n", num3); printf("num4:%d\n", num4); } void test08() { char *str = "abcde#12uiop@0plju"; char buf[1024] = {0}; sscanf(str, "%*[^#]#%[^@]", buf); printf("buf:%s\n", buf); } int main() { // test01(); // test02(); // test03(); // test04(); // test05(); // test06(); // test07(); test08(); getchar(); return 0; } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看