Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Comparing Strings

Discussion in 'Scripting' started by Darloc, Jun 8, 2012.

  1. Darloc

    Darloc

    Joined:
    Feb 16, 2011
    Posts:
    167
    Is there an easy way in JS to compare two strings alphabetically? like if string 1 is add and string 2 is five then string1 < String 2?
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
  3. Darloc

    Darloc

    Joined:
    Feb 16, 2011
    Posts:
    167
    That worked great thanks