Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1772e6d in mainline


Ignore:
Timestamp:
2012-07-30T21:34:04Z (10 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial
Children:
f80fd8c
Parents:
597b12e
Message:

Update documentation for str_cmp and str_lcmp.

This is a modified version of formulation suggested by Jiri Zarevucky.

Files:
3 edited

Legend:

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

    r597b12e r1772e6d  
    357357 * and both strings consist of the same sequence of characters.
    358358 *
    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.
     359 * A string S1 is less than another string S2 if it has a character with
     360 * lower value at the first character position where the strings differ.
     361 * If the strings differ in length, the shorter one is treated as if
     362 * padded by characters with a value of zero.
    362363 *
    363364 * @param s1 First string to compare.
    364365 * @param s2 Second string to compare.
    365366 *
    366  * @return 0 if the strings are equal, -1 if first is smaller,
    367  *         1 if second smaller.
     367 * @return 0 if the strings are equal, -1 if the first is less than the second,
     368 *         1 if the second is less than the first.
    368369 *
    369370 */
  • kernel/generic/src/lib/str.c

    r597b12e r1772e6d  
    459459 * and both strings consist of the same sequence of characters.
    460460 *
    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.
     461 * A string S1 is less than another string S2 if it has a character with
     462 * lower value at the first character position where the strings differ.
     463 * If the strings differ in length, the shorter one is treated as if
     464 * padded by characters with a value of zero.
    464465 *
    465466 * @param s1 First string to compare.
    466467 * @param s2 Second string to compare.
    467468 *
    468  * @return 0 if the strings are equal, -1 if first is smaller,
    469  *         1 if second smaller.
     469 * @return 0 if the strings are equal, -1 if the first is less than the second,
     470 *         1 if the second is less than the first.
    470471 *
    471472 */
     
    503504 * up to max_len characters.
    504505 *
    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.
     506 * A string S1 is less than another string S2 if it has a character with
     507 * lower value at the first character position where the strings differ.
     508 * If the strings differ in length, the shorter one is treated as if
     509 * padded by characters with a value of zero. Only the first max_len
     510 * characters are considered.
    508511 *
    509512 * @param s1      First string to compare.
     
    511514 * @param max_len Maximum number of characters to consider.
    512515 *
    513  * @return 0 if the strings are equal, -1 if first is smaller,
    514  *         1 if second smaller.
     516 * @return 0 if the strings are equal, -1 if the first is less than the second,
     517 *         1 if the second is less than the first.
    515518 *
    516519 */
  • uspace/lib/c/generic/str.c

    r597b12e r1772e6d  
    431431 * and both strings consist of the same sequence of characters.
    432432 *
    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.
     433 * A string S1 is less than another string S2 if it has a character with
     434 * lower value at the first character position where the strings differ.
     435 * If the strings differ in length, the shorter one is treated as if
     436 * padded by characters with a value of zero.
    436437 *
    437438 * @param s1 First string to compare.
    438439 * @param s2 Second string to compare.
    439440 *
    440  * @return 0 if the strings are equal, -1 if first is smaller,
    441  *         1 if second smaller.
     441 * @return 0 if the strings are equal, -1 if the first is less than the second,
     442 *         1 if the second is less than the first.
    442443 *
    443444 */
     
    475476 * up to max_len characters.
    476477 *
    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.
     478 * A string S1 is less than another string S2 if it has a character with
     479 * lower value at the first character position where the strings differ.
     480 * If the strings differ in length, the shorter one is treated as if
     481 * padded by characters with a value of zero. Only the first max_len
     482 * characters are considered.
    480483 *
    481484 * @param s1      First string to compare.
     
    483486 * @param max_len Maximum number of characters to consider.
    484487 *
    485  * @return 0 if the strings are equal, -1 if first is smaller,
    486  *         1 if second smaller.
     488 * @return 0 if the strings are equal, -1 if the first is less than the second,
     489 *         1 if the second is less than the first.
    487490 *
    488491 */
Note: See TracChangeset for help on using the changeset viewer.