Ignore:
Timestamp:
Jan 18, 2017 10:55:35 AM (4 years ago)
Author:
nanang
Message:

Re #1900: Merged changes from trunk.

Location:
pjproject/branches/projects/uwp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/uwp

  • pjproject/branches/projects/uwp/pjlib/include/pj/string.h

    r5513 r5532  
    475475} 
    476476 
     477 
     478/** 
     479 * Find the first index of character, in a string, that does not belong to a  
     480 * set of characters. 
     481 * 
     482 * @param str       The string. 
     483 * @param set_char  The string containing the set of characters.  
     484 * 
     485 * @return the index of the first character in the str that doesn't belong to  
     486 * set_char. If str starts with a character not in set_char, return 0. 
     487 */ 
     488PJ_DECL(pj_ssize_t) pj_strspn(const pj_str_t *str, const pj_str_t *set_char); 
     489 
     490 
     491/** 
     492 * Find the first index of character, in a string, that does not belong to a 
     493 * set of characters. 
     494 * 
     495 * @param str       The string. 
     496 * @param set_char  The string containing the set of characters. 
     497 * 
     498 * @return the index of the first character in the str that doesn't belong to 
     499 * set_char. If str starts with a character not in set_char, return 0. 
     500 */ 
     501PJ_DECL(pj_ssize_t) pj_strspn2(const pj_str_t *str, const char *set_char); 
     502 
     503 
     504/** 
     505 * Find the first index of character, in a string, that belong to a set of  
     506 * characters. 
     507 * 
     508 * @param str       The string. 
     509 * @param set_char  The string containing the set of characters. 
     510 * 
     511 * @return the index of the first character in the str that belong to 
     512 * set_char. If no match is found, return the length of str. 
     513 */ 
     514PJ_DECL(pj_ssize_t) pj_strcspn(const pj_str_t *str, const pj_str_t *set_char); 
     515 
     516 
     517/** 
     518 * Find the first index of character, in a string, that belong to a set of 
     519 * characters. 
     520 * 
     521 * @param str       The string. 
     522 * @param set_char  The string containing the set of characters. 
     523 * 
     524 * @return the index of the first character in the str that belong to 
     525 * set_char. If no match is found, return the length of str. 
     526 */ 
     527PJ_DECL(pj_ssize_t) pj_strcspn2(const pj_str_t *str, const char *set_char); 
     528 
     529 
     530/** 
     531 * Find tokens from a string using the delimiter. 
     532 * 
     533 * @param str       The string. 
     534 * @param delim     The string containing the delimiter. It might contain  
     535 *                  multiple character treated as unique set. If same character 
     536 *                  was found on the set, it will be skipped. 
     537 * @param tok       The string containing the token. 
     538 * @param start_idx The search will start from this index. 
     539 * 
     540 * @return the index of token from the str, or the length of the str 
     541 * if the token is not found. 
     542 */ 
     543PJ_DECL(pj_ssize_t) pj_strtok(const pj_str_t *str, const pj_str_t *delim, 
     544                              pj_str_t *tok, pj_size_t start_idx); 
     545 
     546 
     547/** 
     548 * Find tokens from a string using the delimiter. 
     549 * 
     550 * @param str       The string. 
     551 * @param delim     The string containing the delimiter. It might contain 
     552 *                  multiple character treated as unique set. If same character 
     553 *                  was found on the set, it will be skipped. 
     554 * @param tok       The string containing the token. 
     555 * @param start_idx The search will start from this index. 
     556 * 
     557 * @return the index of token from the str, or the length of the str 
     558 * if the token is not found. 
     559 */ 
     560PJ_DECL(pj_ssize_t) pj_strtok2(const pj_str_t *str, const char *delim, 
     561                               pj_str_t *tok, pj_size_t start_idx); 
     562 
     563 
    477564/** 
    478565 * Find the occurence of a substring substr in string str. 
Note: See TracChangeset for help on using the changeset viewer.