Changeset 72cf064 in mainline for kernel/generic/src/lib/str.c
- Timestamp:
- 2012-08-13T17:17:04Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 33fee91
- Parents:
- f4a8734 (diff), 4820360 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/str.c
rf4a8734 r72cf064 456 456 * 457 457 * 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 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. 460 465 * 461 466 * @param s1 First string to compare. 462 467 * @param s2 Second string to compare. 463 468 * 464 * @return 0 if the strings are equal, -1 if first is smaller,465 * 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. 466 471 * 467 472 */ … … 494 499 * 495 500 * 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. 501 * The strings are considered equal iff 502 * min(str_length(s1), max_len) == min(str_length(s2), max_len) 503 * and both strings consist of the same sequence of characters, 504 * up to max_len characters. 505 * 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. 498 511 * 499 512 * @param s1 First string to compare. … … 501 514 * @param max_len Maximum number of characters to consider. 502 515 * 503 * @return 0 if the strings are equal, -1 if first is smaller,504 * 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. 505 518 * 506 519 */
Note:
See TracChangeset
for help on using the changeset viewer.