📄 ansistring.html
字号:
const char * s1, /* string to compare */ const char * s2 /* string to compare <i>s1</i> to */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine compares string <i>s1</i> to string <i>s2</i> lexicographically.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>An integer greater than, equal to, or less than 0,according to whether <i>s1</i> is lexicographicallygreater than, equal to, or less than <i>s2</i>, respectively.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strcoll"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strcoll( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strcoll( )</strong> - compare two strings as appropriate to <b>LC_COLLATE</b> (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int strcoll ( const char * s1, /* string 1 */ const char * s2 /* string 2 */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine compares two strings, both interpreted as appropriate to the<b>LC_COLLATE</b> category of the current locale.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p><p>An integer greater than, equal to, or less than zero, according to whetherstring <i>s1</i> is greater than, equal to, or less than string <i>s2</i> when bothare interpreted as appropriate to the current locale.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strcpy"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strcpy( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strcpy( )</strong> - copy one string to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * strcpy ( char * s1, /* string to copy to */ const char * s2 /* string to copy from */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies string <i>s2</i> (including EOS) to string <i>s1</i>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to <i>s1</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strcspn"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strcspn( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strcspn( )</strong> - return the string length up to the first character from a given set (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>size_t strcspn ( const char * s1, /* string to search */ const char * s2 /* set of characters to look for in <i>s1</i> */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine computes the length of the maximum initial segment of string<i>s1</i> that consists entirely of characters not included in string <i>s2</i>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p><p>The length of the string segment.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b>, <b><a href="./ansiString.html#strpbrk">strpbrk</a>( )</b>, <b><a href="./ansiString.html#strspn">strspn</a>( )</b><hr><a name="strerror_r"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strerror_r( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strerror_r( )</strong> - map an error number to an error string (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS strerror_r ( int errcode, /* error code */ char * buffer /* string buffer */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine maps the error number in <i>errcode</i> to an error message string.It stores the error string in <i>buffer</i>.<p>This routine is the POSIX reentrant version of <b><a href="./ansiString.html#strerror">strerror</a>( )</b>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b>, <b><a href="./ansiString.html#strerror">strerror</a>( )</b><hr><a name="strerror"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strerror( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strerror( )</strong> - map an error number to an error string (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * strerror ( int errcode /* error code */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine maps the error number in <i>errcode</i> to an error message string.It returns a pointer to a static buffer that holds the error string.<p>This routine is not reentrant. For a reentrant version, see <b><a href="./ansiString.html#strerror_r">strerror_r</a>( )</b>.<p></blockquote><h4>INCLUDE</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the buffer that holds the error string.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b>, <b><a href="./ansiString.html#strerror_r">strerror_r</a>( )</b><hr><a name="strlen"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strlen( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strlen( )</strong> - determine the length of a string (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>size_t strlen ( const char * s /* string */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the number of characters in <i>s</i>, not including EOS.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>The number of non-null characters in the string.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strncat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strncat( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strncat( )</strong> - concatenate characters from one string to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * strncat ( char * dst, /* string to append to */ const char * src, /* string to append */ size_t n /* max no. of characters to append */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine appends up to <i>n</i> characters from string <i>src</i> to theend of string <i>dst</i>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the null-terminated string <i>s1</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strncmp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strncmp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strncmp( )</strong> - compare the first <i>n</i> characters of two strings (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int strncmp ( const char * s1, /* string to compare */ const char * s2, /* string to compare <i>s1</i> to */ size_t n /* max no. of characters to compare */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine compares up to <i>n</i> characters of string <i>s1</i> to string <i>s2</i>lexicographically.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p><p>An integer greater than, equal to, or less than 0, according to whether<i>s1</i> is lexicographically greater than, equal to, or less than <i>s2</i>,respectively.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strncpy"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strncpy( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strncpy( )</strong> - copy characters from one string to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char *strncpy ( char * s1, /* string to copy to */ const char * s2, /* string to copy from */ size_t n /* max no. of characters to copy */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies <i>n</i> characters from string <i>s2</i> to string <i>s1</i>.If <i>n</i> is greater than the length of <i>s2</i>, nulls are added to <i>s1</i>.If <i>n</i> is less than or equal to the length of <i>s2</i>, the targetstring will not be null-terminated.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -