Changeset 4efeab5 in mainline


Ignore:
Timestamp:
2012-07-29T20:32:05Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
99047a72
Parents:
13d5639
Message:

Update documentation for str_cmp and str_lcmp

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • boot/generic/src/str.c

    r13d5639 r4efeab5  
    354354 *
    355355 * Do a char-by-char comparison of two NULL-terminated strings.
    356  * The strings are considered equal iff they consist of the same
    357  * characters on the minimum of their lengths.
     356 * The strings are considered equal iff their length is equal
     357 * and both strings consist of the same sequence of characters.
     358 *
     359 * A string is smaller than another string iff it is shorter or
     360 * has a character with lower value at the first position where
     361 * the strings differ.
    358362 *
    359363 * @param s1 First string to compare.
  • kernel/generic/src/lib/str.c

    r13d5639 r4efeab5  
    456456 *
    457457 * Do a char-by-char comparison of two NULL-terminated strings.
    458  * The strings are considered equal iff they consist of the same
    459  * characters on the minimum of their lengths.
     458 * The strings are considered equal iff their length is equal
     459 * and both strings consist of the same sequence of characters.
     460 *
     461 * A string is smaller than another string iff it is shorter or
     462 * has a character with lower value at the first position where
     463 * the strings differ.
    460464 *
    461465 * @param s1 First string to compare.
     
    494498 *
    495499 * Do a char-by-char comparison of two NULL-terminated strings.
    496  * The strings are considered equal iff they consist of the same
    497  * characters on the minimum of their lengths and the length limit.
     500 * The strings are considered equal iff
     501 * min(str_length(s1), max_len) == min(str_length(s2), max_len)
     502 * and both strings consist of the same sequence of characters,
     503 * up to max_len characters.
     504 *
     505 * A string is smaller than another string iff it is shorter or
     506 * has a character with lower value at the first position where
     507 * the strings differ, considering only first max_len characters.
    498508 *
    499509 * @param s1      First string to compare.
  • uspace/lib/c/generic/str.c

    r13d5639 r4efeab5  
    428428 *
    429429 * Do a char-by-char comparison of two NULL-terminated strings.
    430  * The strings are considered equal iff they consist of the same
    431  * characters on the minimum of their lengths.
     430 * The strings are considered equal iff their length is equal
     431 * and both strings consist of the same sequence of characters.
     432 *
     433 * A string is smaller than another string iff it is shorter or
     434 * has a character with lower value at the first position where
     435 * the strings differ.
    432436 *
    433437 * @param s1 First string to compare.
     
    466470 *
    467471 * Do a char-by-char comparison of two NULL-terminated strings.
    468  * The strings are considered equal iff they consist of the same
    469  * characters on the minimum of their lengths and the length limit.
     472 * The strings are considered equal iff
     473 * min(str_length(s1), max_len) == min(str_length(s2), max_len)
     474 * and both strings consist of the same sequence of characters,
     475 * up to max_len characters.
     476 *
     477 * A string is smaller than another string iff it is shorter or
     478 * has a character with lower value at the first position where
     479 * the strings differ, considering only first max_len characters.
    470480 *
    471481 * @param s1      First string to compare.
Note: See TracChangeset for help on using the changeset viewer.