Changes in uspace/lib/posix/strings.c [fc3680e:8ecef91] in mainline
- File:
-
- 1 edited
-
uspace/lib/posix/strings.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/strings.c
rfc3680e r8ecef91 31 31 * @{ 32 32 */ 33 /** @file Additional string manipulation.33 /** @file 34 34 */ 35 35 … … 45 45 46 46 /** 47 * Find first set bit (beginning with the least significant bit).48 47 * 49 * @param i Integer in which to look for the first set bit.50 * @return Index of first set bit. Bits are numbered starting at one.48 * @param i 49 * @return 51 50 */ 52 51 int posix_ffs(int i) … … 83 82 84 83 /** 85 * Compare two strings (case-insensitive).86 84 * 87 * @param s1 First string to be compared. 88 * @param s2 Second string to be compared. 89 * @return Difference of the first pair of inequal characters, 90 * or 0 if strings have the same content. 85 * @param s1 86 * @param s2 87 * @return 91 88 */ 92 89 int posix_strcasecmp(const char *s1, const char *s2) … … 96 93 97 94 /** 98 * Compare part of two strings (case-insensitive).99 95 * 100 * @param s1 First string to be compared. 101 * @param s2 Second string to be compared. 102 * @param n Maximum number of characters to be compared. 103 * @return Difference of the first pair of inequal characters, 104 * or 0 if strings have the same content. 96 * @param s1 97 * @param s2 98 * @param n 99 * @return 105 100 */ 106 101 int posix_strncasecmp(const char *s1, const char *s2, size_t n) … … 121 116 122 117 /** 123 * Compare two memory areas.124 118 * 125 * @param mem1 Pointer to the first area to compare. 126 * @param mem2 Pointer to the second area to compare. 127 * @param n Common size of both areas. 128 * @return If n is 0, return zero. If the areas match, return 129 * zero. Otherwise return non-zero. 119 * @param mem1 120 * @param mem2 121 * @param n 122 * @return 130 123 */ 131 124 int posix_bcmp(const void *mem1, const void *mem2, size_t n) … … 135 128 136 129 /** 137 * Copy bytes in memory with overlapping areas.138 130 * 139 * @param src Source area.140 * @param dest Destination area.141 * @param n Number of bytes to copy.131 * @param dest 132 * @param src 133 * @param n 142 134 */ 143 void posix_bcopy(const void * src, void *dest, size_t n)135 void posix_bcopy(const void *dest, void *src, size_t n) 144 136 { 145 137 /* Note that memmove has different order of arguments. */ 146 memmove( dest, src, n);138 memmove(src, dest, n); 147 139 } 148 140 149 141 /** 150 * Reset bytes in memory area to zero.151 142 * 152 * @param mem Memory area to be zeroed.153 * @param n Number of bytes to reset.143 * @param mem 144 * @param n 154 145 */ 155 146 void posix_bzero(void *mem, size_t n) … … 159 150 160 151 /** 161 * Scan string for a first occurence of a character.162 152 * 163 * @param s String in which to look for the character. 164 * @param c Character to look for. 165 * @return Pointer to the specified character on success, 166 * NULL pointer otherwise. 153 * @param s 154 * @param c 155 * @return 167 156 */ 168 157 char *posix_index(const char *s, int c) … … 172 161 173 162 /** 174 * Scan string for a last occurence of a character. 175 * 176 * @param s String in which to look for the character. 177 * @param c Character to look for. 178 * @return Pointer to the specified character on success, 179 * NULL pointer otherwise. 163 * 164 * @param s 165 * @param c 166 * @return 180 167 */ 181 168 char *posix_rindex(const char *s, int c)
Note:
See TracChangeset
for help on using the changeset viewer.
