How to find the index of the string separated by delimeters in progress openedge 4gl?

Discussão em 'StackOverflow' iniciado por fdantas, Março 25, 2016.

  1. fdantas

    fdantas Administrator Moderador

    I want to find the index of 56 in "STS++5623+56+ 123 " . The code I have written gives me 6 (of 5623) but I need 11.

    DEFINE var v-segment as longchar no-undo. DEFINE VARIABLE v-element AS CHARACTER NO-UNDO. ASSIGN v-segment = "STS++5623+56". ASSIGN v-element = "56".

    define variable v-index as integer no-undo.

    v-index = index(v-segment , v-element , 1).

    MESSAGE v-index VIEW-AS ALERT-BOX INFO BUTTONS OK.

    Continue reading...

Compartilhe esta Página