Changeset da68871a in mainline for kernel/generic/src/lib/str.c
- Timestamp:
- 2012-08-08T08:46:22Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30c0826
- Parents:
- bc216a0 (diff), 1d01cca (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
rbc216a0 rda68871a 457 457 * 458 458 * Do a char-by-char comparison of two NULL-terminated strings. 459 * The strings are considered equal iff they consist of the same 460 * characters on the minimum of their lengths. 459 * The strings are considered equal iff their length is equal 460 * and both strings consist of the same sequence of characters. 461 * 462 * A string S1 is less than another string S2 if it has a character with 463 * lower value at the first character position where the strings differ. 464 * If the strings differ in length, the shorter one is treated as if 465 * padded by characters with a value of zero. 461 466 * 462 467 * @param s1 First string to compare. 463 468 * @param s2 Second string to compare. 464 469 * 465 * @return 0 if the strings are equal, -1 if first is smaller,466 * 1 if second smaller.470 * @return 0 if the strings are equal, -1 if the first is less than the second, 471 * 1 if the second is less than the first. 467 472 * 468 473 */ … … 495 500 * 496 501 * Do a char-by-char comparison of two NULL-terminated strings. 497 * The strings are considered equal iff they consist of the same 498 * characters on the minimum of their lengths and the length limit. 502 * The strings are considered equal iff 503 * min(str_length(s1), max_len) == min(str_length(s2), max_len) 504 * and both strings consist of the same sequence of characters, 505 * up to max_len characters. 506 * 507 * A string S1 is less than another string S2 if it has a character with 508 * lower value at the first character position where the strings differ. 509 * If the strings differ in length, the shorter one is treated as if 510 * padded by characters with a value of zero. Only the first max_len 511 * characters are considered. 499 512 * 500 513 * @param s1 First string to compare. … … 502 515 * @param max_len Maximum number of characters to consider. 503 516 * 504 * @return 0 if the strings are equal, -1 if first is smaller,505 * 1 if second smaller.517 * @return 0 if the strings are equal, -1 if the first is less than the second, 518 * 1 if the second is less than the first. 506 519 * 507 520 */
Note:
See TracChangeset
for help on using the changeset viewer.