Fast String Compare. Although normally one would expect a string compare function to correctly determine if one string was greater or less than another, this isn't nessesary in sets and maps if one is only concerned with lookup and not seeking to export the sets or maps in lexical order. String comparison can be speed up considerably by treating string values as arrays of 64 bit integers, rather than arrays of bytes.
| Return Type | Function name | Arguments |
|---|---|---|
| int32_t | StringCompareF | (hzString&,hzString&,) |
Declared in file: hzString.h
Defined in file : hzString.cpp
Function Logic:
Function body:
int32_t StringCompareF (hzString& a)hzString& b,
{
// Category: Text Processing
//
// Fast String Compare.
//
// Although normally one would expect a string compare function to correctly determine if one string was greater or less than another, this isn't
// nessesary in sets and maps if one is only concerned with lookup and not seeking to export the sets or maps in lexical order. String comparison
// can be speed up considerably by treating string values as arrays of 64 bit integers, rather than arrays of bytes.
//
// Arguments: 1) a The 1st string
// 2) b The 2nd string
//
// Returns: +1 If a > b
// -1 If a < b
// 0 If a and b are equal.
_hzfunc(__func__) ;
return a.CompareF(b) ;
}