<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 功能強大 支持多語言、二開方便! 廣告
                # C `strspn()`函數 > 原文: [https://beginnersbook.com/2017/11/c-strspn-function/](https://beginnersbook.com/2017/11/c-strspn-function/) **函數`strspn()`**在給定字符串中搜索指定的字符串,并返回給定字符串中匹配的字符數。 ## C `strspn()`聲明 ```c size_t strspn(const char *str1, const char *str2) ``` `str1` - 搜索字符串`str2`的字符的字符串。 `str2` - 另一個字符串,在`str1`中搜索該字符串的字符。 ## `strspn()`的返回值 它返回給定字符串中匹配的字符數。 ## 示例:`strspn()`函數 ```c #include <stdio.h> #include <string.h> int main () { int len; const char str1[] = "abcdefgh"; const char str2[] = "abXXcdeZZh"; /* Searching the string str2 in the string str1. * It returns the count of characters of str2 that * are matched in the str1 */ len = strspn(str1, str2); printf("Number of matched characters: %d\n", len ); return 0; } ``` 輸出: ```c Number of matched characters: 5 ``` #### 相關文章: 1. [C - `strrchr()`函數](https://beginnersbook.com/2017/11/c-strrchr-function/) 2. [C - `strncpy()`函數](https://beginnersbook.com/2017/11/c-strncpy-function/) 3. [C - `strcoll()`函數](https://beginnersbook.com/2017/11/c-strcoll-function/) 4. [C - `strcmp()`函數](https://beginnersbook.com/2017/11/c-strcmp-function/)
                  <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>

                              哎呀哎呀视频在线观看