Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] [QML] strcmp in qml

[SOLVED] [QML] strcmp in qml

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 9.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fmontigny
    wrote on last edited by
    #1

    Hi,

    how can I compare two strings alphabetically in QML?
    it's strcmp in c++.

    Thx
    Fx

    fmontigny

    "time is for all cannot simultaneously"

    [FRANCE]

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on last edited by VRonin
      #2
      var str1 = new String( "This is beautiful string" );
      var str2 = new String( "This is beautiful string" );
      str1.localeCompare( str2 );
      

      --
      Vasiliy

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fmontigny
        wrote on last edited by
        #3

        Is exactly what I want.

        Thx

        fmontigny

        "time is for all cannot simultaneously"

        [FRANCE]

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved