Compare String Variables for Greater or Less Than?

Is there any way to compare two strings for a greater or less than condition? For example, StringA is "apple" and StringB is "bonnet" and StringC is "captain". Can I only test for equal/not-equal, or is there a way to find out whether StringA is less than StringB, and StringC is greater than StringA, etc.
Thanks!

Which language?

Some options:
!=
<>
-ne

In a .ksh script.
Remember, I'm not just looking for equal or not-equal. Need to know greater-than or less-than, in the sense of sorting or collating sequence.'
Thanks!

#!/bin/ksh

str1='apple'
str2='bonnet'
str3='captain'

if [ "${str1}" = "${str2}" ]; then
   echo "[${str1}] = [${str2}]"
else
   echo "[${str1}] != [${str2}]"
fi

if [ $(expr ${str3} \<= ${str2}) -eq 1 ]; then
   echo "[${str3}] <= [${str2}]"
else
   echo "[${str3}] > [${str2}]"
fi

You can check the string 'equality' with the builtin 'test', but have to use something similar to 'expr' to check for the 'alphabetical' comparison.

'man expr' yields:

     expr{ =, \>, \>=, \<, \<=, !=} expr
           Returns the result of an integer  comparison  if  both
           arguments  are  integers, otherwise returns the result
           of a string comparison using the locale-specific coal-
           ition  sequence. The result of each comparison will be
           1 if the specified relationship  is  TRUE,  0  if  the
           relationship is FALSE.

None of which test strings for greater than or less than (i.e. lexical ordering), only for inequality.

In bash:

if [ "$string1" \< "$string2" ]; then

cfajohnson,

The backslash before the relational operator did the trick. Without it, the script thought I was trying to create a file. This is what I have now, based on your suggestion:

if [ $file \> $last_file_loaded ]; then

Thanks!!!

Opps, I had missread the question.

But who determines which is less than what with strings?

For example, StringA is "apple" and StringB is "bonnet" and StringC is "captain".