📄 ansistring.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ansiString.html - generated by refgen from ansiString.c --> <title> ansiString </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>ansiString</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ansiString</strong> - ANSI <b>string</b> documentation </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./ansiString.html#memchr">memchr</a>( )</b> - search a block of memory for a character (ANSI)<br><b><a href="./ansiString.html#memcmp">memcmp</a>( )</b> - compare two blocks of memory (ANSI)<br><b><a href="./ansiString.html#memcpy">memcpy</a>( )</b> - copy memory from one location to another (ANSI)<br><b><a href="./ansiString.html#memmove">memmove</a>( )</b> - copy memory from one location to another (ANSI)<br><b><a href="./ansiString.html#memset">memset</a>( )</b> - set a block of memory (ANSI)<br><b><a href="./ansiString.html#strcat">strcat</a>( )</b> - concatenate one string to another (ANSI)<br><b><a href="./ansiString.html#strchr">strchr</a>( )</b> - find the first occurrence of a character in a string (ANSI)<br><b><a href="./ansiString.html#strcmp">strcmp</a>( )</b> - compare two strings lexicographically (ANSI)<br><b><a href="./ansiString.html#strcoll">strcoll</a>( )</b> - compare two strings as appropriate to <b>LC_COLLATE</b> (ANSI)<br><b><a href="./ansiString.html#strcpy">strcpy</a>( )</b> - copy one string to another (ANSI)<br><b><a href="./ansiString.html#strcspn">strcspn</a>( )</b> - return the string length up to the first character from a given set (ANSI)<br><b><a href="./ansiString.html#strerror_r">strerror_r</a>( )</b> - map an error number to an error string (POSIX)<br><b><a href="./ansiString.html#strerror">strerror</a>( )</b> - map an error number to an error string (ANSI)<br><b><a href="./ansiString.html#strlen">strlen</a>( )</b> - determine the length of a string (ANSI)<br><b><a href="./ansiString.html#strncat">strncat</a>( )</b> - concatenate characters from one string to another (ANSI)<br><b><a href="./ansiString.html#strncmp">strncmp</a>( )</b> - compare the first <i>n</i> characters of two strings (ANSI)<br><b><a href="./ansiString.html#strncpy">strncpy</a>( )</b> - copy characters from one string to another (ANSI)<br><b><a href="./ansiString.html#strpbrk">strpbrk</a>( )</b> - find the first occurrence in a string of a character from a given set (ANSI)<br><b><a href="./ansiString.html#strrchr">strrchr</a>( )</b> - find the last occurrence of a character in a string (ANSI)<br><b><a href="./ansiString.html#strspn">strspn</a>( )</b> - return the string length up to the first character not in a given set (ANSI)<br><b><a href="./ansiString.html#strstr">strstr</a>( )</b> - find the first occurrence of a substring in a string (ANSI)<br><b><a href="./ansiString.html#strtok">strtok</a>( )</b> - break down a string into tokens (ANSI)<br><b><a href="./ansiString.html#strtok_r">strtok_r</a>( )</b> - break down a string into tokens (reentrant) (POSIX)<br><b><a href="./ansiString.html#strxfrm">strxfrm</a>( )</b> - transform up to <i>n</i> characters of <i>s2</i> into <i>s1</i> (ANSI)<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library includes several standard ANSI routines. Note that wherethere is a pair of routines, such as <b><a href="./ansiStdlib.html#div">div</a>( )</b> and <b><a href="./ansiStdlib.html#div_r">div_r</a>( )</b>, only the routine<b>xxx_r( )</b> is reentrant. The <b>xxx( )</b> routine is not reentrant.<p>The header <b>string.h</b> declares one type and several functions, and defines onemacro useful for manipulating arrays of character type and other objectstreated as array of character type. The type is <b>size_t</b> and the macro NULL.Various methods are used for determining the lengths of the arrays, but inall cases a <b>char *</b> or <b>void *</b> argument points to the initial (lowestaddressed) character of the array. If an array is accessed beyond the endof an object, the behavior is undefined.<p></blockquote><h4>SEE ALSO</h4><blockquote><p>American National Standard X3.159-1989<p><hr><a name="memchr"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>memchr( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>memchr( )</strong> - search a block of memory for a character (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * memchr ( const void * m, /* block of memory */ int c, /* character to search for */ size_t n /* size of memory to search */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches for the first element of an array of <b>unsigned char</b>,beginning at the address <i>m</i> with size <i>n</i>, that equals <i>c</i> converted toan <b>unsigned char</b>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>If successful, it returns the address of the matching element;otherwise, it returns a null pointer.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="memcmp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>memcmp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>memcmp( )</strong> - compare two blocks of memory (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int memcmp ( const void * s1, /* array 1 */ const void * s2, /* array 2 */ size_t n /* size of memory to compare */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine compares successive elements from two arrays of <b>unsigned char</b>,beginning at the addresses <i>s1</i> and <i>s2</i> (both of size <i>n</i>), until it findselements that are not equal.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p><p>If all elements are equal, zero. If elements differ and the differingelement from <i>s1</i> is greater than the element from <i>s2</i>, the routinereturns a positive number; otherwise, it returns a negative number.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="memcpy"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>memcpy( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>memcpy( )</strong> - copy memory from one location to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * memcpy ( void * destination, /* destination of copy */ const void * source, /* source of copy */ size_t size /* size of memory to copy */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies <i>size</i> characters from the object pointedto by <i>source</i> into the object pointed to by <i>destination</i>. If copyingtakes place between objects that overlap, the behavior is undefined.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to <i>destination</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="memmove"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>memmove( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>memmove( )</strong> - copy memory from one location to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * memmove ( void * destination, /* destination of copy */ const void * source, /* source of copy */ size_t size /* size of memory to copy */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies <i>size</i> characters from the memory location <i>source</i> tothe location <i>destination</i>. It ensures that the memory is not corruptedeven if <i>source</i> and <i>destination</i> overlap.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to <i>destination</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="memset"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>memset( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>memset( )</strong> - set a block of memory (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * memset ( void * m, /* block of memory */ int c, /* character to store */ size_t size /* size of memory */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine stores <i>c</i> converted to an <b>unsigned char</b> in each of theelements of the array of <b>unsigned char</b> beginning at <i>m</i>, with size <i>size</i>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to <i>m</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strcat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strcat( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strcat( )</strong> - concatenate one string to another (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * strcat ( char * destination, /* string to be appended to */ const char * append /* string to append to <i>destination</i> */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine appends a copy of string <i>append</i> to the end of string <i>destination</i>. The resulting string is null-terminated.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to <i>destination</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strchr"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strchr( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strchr( )</strong> - find the first occurrence of a character in a string (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * strchr ( const char * s, /* string in which to search */ int c /* character to find in string */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the first occurrence of character <i>c</i>in string <i>s</i>. The terminating null is considered to be part of the string.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>string.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p><p>The address of the located character, or NULL if the character is not found.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiString.html#top">ansiString</a></b><hr><a name="strcmp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>strcmp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strcmp( )</strong> - compare two strings lexicographically (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int strcmp (
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -