Pointui » General Support

[Help] String Comparision

(5 posts)
  • Started 1 year ago by GrPaZ
  • Latest reply from GrPaZ
  • This topic is not resolved
  1. GrPaZ
    Member

    I want to compare two Strings:

    is String One lower then String Two?

    String strOne;
    String strTwo;
    strOne = "alpha";
    strTwo = "beta";
    if(strOne < strTwo){
    return true;
    }

    i need it, because i need to sort a collection!

    it's urgent, thanks

    Posted 1 year ago #
  2. you can't do a mathematical comaprison on 2 strings, you will have to find some way of converting them to the charater code, one symbol at a time.

    Posted 1 year ago #
  3. GrPaZ
    Member

    but in Standardway the Object String has the Methd Compare(StringA,StringB) and returns an integer value:
    StringA < StringB = -1;
    StringA = StringB = 0;
    StringA > StringB = 1;

    i just want this option or function at my script..i tried to recreate it, but didn't fix it until now...please help me

    Posted 1 year ago #
  4. GrPaZ
    Member

    it would also be cool, to have an Array where i can do this:

    StringArray test;
    String StringA;
    String StringB;
    StringA = "Alpha";
    StringB = "Beta";
    test.Add("beatakey",SringB);
    test.Add("alphakey",SringA);
    test.sortByKey();

    int count;
    int i;
    count = test.size();
    for(i=0;i<count;i++){
    String Key;
    Key = test.Key(i);
    String value;
    value=test.get(Key);

    }

    this would be sooo nice!

    Posted 1 year ago #
  5. GrPaZ
    Member

    back to the top of the list!

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.