Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Scroll tablelayout
sortDirectionASC
repeatTableHeadersdefaultstyle
widths11%, 15%, 14%, 13%, 47%
style
sortByColumn1
sortEnabledfalse
cellHighlightingtrue

...

See Description section above for explanation of the return value.

Examples

Code Block
languagetext
// Demonstrate string comparison.

...


string $str1 = "Bob";

...


string $str2 = "Stan";

...


string $str3 = "bob";

...


int $val;

...


 

...

// Compare the first two strings.

...


$val = `strCompare $str1 $str2`;

...


print $val; 

...


// Should be less than 0

...


 

...

// Compare the second and third strings.

...


$val = `strCompare $str2 $str3`;

...


print $val; 

...

// Should be less than 0

...


 

...

// Compare the first and the third.

...


$val = `strCompare $str1 $str3`;print $val; 

...

// Should be less than 0

...


 

...

// Do a case insensitive search of the first and third

...


$val = `strCompare $str1 $str3 -noCase`;

...


print $val; 

...


// Should be 0

Scroll pagebreak

Additional information

...