Changeset 101764 in vbox for trunk/src/libs/xpcom18a4/nsprpub/lib/libc/include
- Timestamp:
- Nov 4, 2023 4:53:22 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/lib/libc/include/plstr.h
r11551 r101764 75 75 #define PL_strcaserstr VBoxNsplPL_strcaserstr 76 76 #define PL_strcasestr VBoxNsplPL_strcasestr 77 #define PL_strcat VBoxNsplPL_strcat78 #define PL_strcatn VBoxNsplPL_strcatn79 #define PL_strchr VBoxNsplPL_strchr80 #define PL_strcpy VBoxNsplPL_strcpy81 #define PL_strncaserstr VBoxNsplPL_strncaserstr82 #define PL_strncasestr VBoxNsplPL_strncasestr83 #define PL_strncat VBoxNsplPL_strncat84 #define PL_strnchr VBoxNsplPL_strnchr85 77 #define PL_strndup VBoxNsplPL_strndup 86 78 #define PL_strnlen VBoxNsplPL_strnlen 87 #define PL_strnpbrk VBoxNsplPL_strnpbrk88 #define PL_strnprbrk VBoxNsplPL_strnprbrk89 #define PL_strnrchr VBoxNsplPL_strnrchr90 #define PL_strnrstr VBoxNsplPL_strnrstr91 79 #define PL_strnstr VBoxNsplPL_strnstr 92 80 #define PL_strpbrk VBoxNsplPL_strpbrk 93 #define PL_strprbrk VBoxNsplPL_strprbrk94 81 #define PL_strrstr VBoxNsplPL_strrstr 95 #define PL_strstr VBoxNsplPL_strstr96 #define PL_strtok_r VBoxNsplPL_strtok_r97 82 #endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */ 98 83 … … 117 102 PR_EXTERN(PRUint32) 118 103 PL_strnlen(const char *str, PRUint32 max); 119 120 /*121 * PL_strcpy122 *123 * Copies the source string, up to and including the trailing '\0', into the124 * destination buffer. It does not (can not) verify that the destination125 * buffer is large enough. It returns the "dest" argument.126 */127 128 PR_EXTERN(char *)129 PL_strcpy(char *dest, const char *src);130 104 131 105 /* … … 202 176 PR_EXTERN(char *) 203 177 PL_strndup(const char *s, PRUint32 max); 204 205 /*206 * PL_strcat207 *208 * Appends a copy of the string pointed to by the second argument to the209 * end of the string pointed to by the first. The destination buffer is210 * not (can not be) checked for sufficient size. A null destination211 * argument returns null; otherwise, the first argument is returned.212 */213 214 PR_EXTERN(char *)215 PL_strcat(char *dst, const char *src);216 217 /*218 * PL_strncat219 *220 * Appends a copy of the string pointed to by the second argument, up to221 * the maximum size specified, to the end of the string pointed to by the222 * first. The destination buffer is not (can not be) checked for sufficient223 * size. A null destination argument returns null; otherwise, the first224 * argument is returned. If the maximum size limits the copy, then the225 * result will *not* be null-terminated (JLRU). A null destination226 * returns null; otherwise, the destination argument is returned.227 */228 229 PR_EXTERN(char *)230 PL_strncat(char *dst, const char *src, PRUint32 max);231 232 /*233 * PL_strcatn234 *235 * Appends a copy of the string pointed to by the third argument, to the236 * end of the string pointed to by the first. The second argument specifies237 * the maximum size of the destination buffer, including the null termination.238 * If the existing string in dst is longer than the max, no action is taken.239 * The resulting string will be null-terminated. A null destination returns240 * null; otherwise, the destination argument is returned.241 */242 243 PR_EXTERN(char *)244 PL_strcatn(char *dst, PRUint32 max, const char *src);245 178 246 179 /* … … 295 228 296 229 /* 297 * PL_strchr298 *299 * Returns a pointer to the first instance of the specified character in the300 * provided string. It returns null if the character is not found, or if the301 * provided string is null. The character may be the null character.302 */303 304 PR_EXTERN(char *)305 PL_strchr(const char *s, char c);306 307 /*308 230 * PL_strrchr 309 231 * … … 317 239 318 240 /* 319 * PL_strnchr320 *321 * Returns a pointer to the first instance of the specified character within the322 * first n characters of the provided string. It returns null if the character323 * is not found, or if the provided string is null. The character may be the324 * null character.325 */326 327 PR_EXTERN(char *)328 PL_strnchr(const char *s, char c, PRUint32 n);329 330 /*331 * PL_strnrchr332 *333 * Returns a pointer to the last instance of the specified character within the334 * first n characters of the provided string. It returns null if the character is335 * not found, or if the provided string is null. The character may be the null336 * character.337 */338 339 PR_EXTERN(char *)340 PL_strnrchr(const char *s, char c, PRUint32 n);341 342 /*343 241 * NOTE: Looking for strcasechr, strcaserchr, strncasechr, or strncaserchr? 344 242 * Use strpbrk, strprbrk, strnpbrk or strnprbrk. … … 357 255 358 256 /* 359 * PL_strprbrk360 *361 * Returns a pointer to the last instance in the first string of any character362 * (not including the terminating null character) of the second string. It returns363 * null if either string is null.364 */365 366 PR_EXTERN(char *)367 PL_strprbrk(const char *s, const char *list);368 369 /*370 * PL_strnpbrk371 *372 * Returns a pointer to the first instance (within the first n characters) of any373 * character (not including the terminating null character) of the second string.374 * It returns null if either string is null.375 */376 377 PR_EXTERN(char *)378 PL_strnpbrk(const char *s, const char *list, PRUint32 n);379 380 /*381 * PL_strnprbrk382 *383 * Returns a pointer to the last instance (within the first n characters) of any384 * character (not including the terminating null character) of the second string.385 * It returns null if either string is null.386 */387 388 PR_EXTERN(char *)389 PL_strnprbrk(const char *s, const char *list, PRUint32 n);390 391 /*392 * PL_strstr393 *394 * Returns a pointer to the first instance of the little string within the395 * big one. It returns null if either string is null.396 */397 398 PR_EXTERN(char *)399 PL_strstr(const char *big, const char *little);400 401 /*402 257 * PL_strrstr 403 258 * … … 421 276 422 277 /* 423 * PL_strnrstr424 *425 * Returns a pointer to the last instance of the little string within the first426 * n characters of the big one. It returns null if either string is null. It427 * returns null if the length of the little string is greater than n.428 */429 430 PR_EXTERN(char *)431 PL_strnrstr(const char *big, const char *little, PRUint32 max);432 433 /*434 278 * PL_strcasestr 435 279 * … … 440 284 PR_EXTERN(char *) 441 285 PL_strcasestr(const char *big, const char *little); 442 443 /*444 * PL_strcaserstr445 *446 * Returns a pointer to the last instance of the little string within the big one,447 * ignoring case. It returns null if either string is null.448 */449 450 PR_EXTERN(char *)451 PL_strcaserstr(const char *big, const char *little);452 453 /*454 * PL_strncasestr455 *456 * Returns a pointer to the first instance of the listtle string within the first457 * n characters of the big one, ignoring case. It returns null if either string is458 * null. It returns null if the length of the little string is greater than n.459 */460 461 PR_EXTERN(char *)462 PL_strncasestr(const char *big, const char *little, PRUint32 max);463 464 /*465 * PL_strncaserstr466 *467 * Returns a pointer to the last instance of the little string within the first468 * n characters of the big one, ignoring case. It returns null if either string is469 * null. It returns null if the length of the little string is greater than n.470 */471 472 PR_EXTERN(char *)473 PL_strncaserstr(const char *big, const char *little, PRUint32 max);474 475 /*476 * PL_strtok_r477 *478 * Splits the string s1 into tokens, separated by one or more characters479 * from the separator string s2. The argument lasts points to a480 * user-supplied char * pointer in which PL_strtok_r stores information481 * for it to continue scanning the same string.482 *483 * In the first call to PL_strtok_r, s1 points to a string and the value484 * of *lasts is ignored. PL_strtok_r returns a pointer to the first485 * token, writes '\0' into the character following the first token, and486 * updates *lasts.487 *488 * In subsequent calls, s1 is null and lasts must stay unchanged from the489 * previous call. The separator string s2 may be different from call to490 * call. PL_strtok_r returns a pointer to the next token in s1. When no491 * token remains in s1, PL_strtok_r returns null.492 */493 494 PR_EXTERN(char *)495 PL_strtok_r(char *s1, const char *s2, char **lasts);496 286 497 287 /*
Note:
See TracChangeset
for help on using the changeset viewer.