diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/string%2Fwide%2Fwcscspn.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/string%2Fwide%2Fwcscspn.html')
| -rw-r--r-- | devdocs/c/string%2Fwide%2Fwcscspn.html | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/devdocs/c/string%2Fwide%2Fwcscspn.html b/devdocs/c/string%2Fwide%2Fwcscspn.html deleted file mode 100644 index 2cafb850..00000000 --- a/devdocs/c/string%2Fwide%2Fwcscspn.html +++ /dev/null @@ -1,39 +0,0 @@ - <h1 id="firstHeading" class="firstHeading">wcscspn</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><wchar.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl"> <td> <pre data-language="c">size_t wcscspn( const wchar_t* dest, const wchar_t* src );</pre> -</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c95">(since C95)</span> </td> </tr> </table> <p>Returns the length of the maximum initial segment of the wide string pointed to by <code>dest</code>, that consists of only the characters <i>not</i> found in wide string pointed to by <code>src</code>.</p> -<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> dest </td> <td> - </td> <td> pointer to the null-terminated wide string to be analyzed </td> -</tr> <tr class="t-par"> <td> src </td> <td> - </td> <td> pointer to the null-terminated wide string that contains the characters to search for </td> -</tr> -</table> <h3 id="Return_value"> Return value</h3> <p>The length of the maximum initial segment that contains only characters not found in the character string pointed to by <code>src</code></p> -<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <locale.h> -#include <wchar.h> - -int main(void) -{ - wchar_t dest[] = L"白猫 黑狗 甲虫"; - /* └───┐ */ - const wchar_t *src = L"甲虫,黑狗"; - - const size_t len = wcscspn(dest, src); - dest[len] = L'\0'; /* terminates the segment to print it out */ - - setlocale(LC_ALL, "en_US.utf8"); - wprintf(L"The length of maximum initial segment is %td.\n" - L"The segment is \"%ls\".\n", len, dest); -}</pre></div> <p>Output:</p> -<div class="text source-text"><pre data-language="c">The length of maximum initial segment is 3. -The segment is "白猫 ".</pre></div> </div> <h3 id="References"> References</h3> <ul> -<li> C11 standard (ISO/IEC 9899:2011): </li> -<ul><li> 7.29.4.5.2 The wcscspn function (p: 435-436) </li></ul> -<li> C99 standard (ISO/IEC 9899:1999): </li> -<ul><li> 7.24.4.5.2 The wcscspn function (p: 381-382) </li></ul> -</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="wcsspn" title="c/string/wide/wcsspn"> <span class="t-lines"><span>wcsspn</span></span></a></div> -<div><span class="t-lines"><span><span class="t-mark-rev t-since-c95">(C95)</span></span></span></div> </td> <td> returns the length of the maximum initial segment that consists <br> of only the wide characters found in another wide string <br> <span class="t-mark">(function)</span> </td> -</tr> <tr class="t-dsc"> <td> <div><a href="wcspbrk" title="c/string/wide/wcspbrk"> <span class="t-lines"><span>wcspbrk</span></span></a></div> -<div><span class="t-lines"><span><span class="t-mark-rev t-since-c95">(C95)</span></span></span></div> </td> <td> finds the first location of any wide character in one wide string, in another wide string <br> <span class="t-mark">(function)</span> </td> -</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/string/wide/wcscspn" title="cpp/string/wide/wcscspn">C++ documentation</a></span> for <code>wcscspn</code> </td> -</tr> </table> <div class="_attribution"> - <p class="_attribution-p"> - © cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br> - <a href="https://en.cppreference.com/w/c/string/wide/wcscspn" class="_attribution-link">https://en.cppreference.com/w/c/string/wide/wcscspn</a> - </p> -</div> |
