Code to split delimiter string

Discussão em 'StackOverflow' iniciado por fdantas, Novembro 14, 2016.

  1. fdantas

    fdantas Administrator Moderador

    I am a newby of learning Progress OpenEdge. I have a question about how to split a string input from user to get the output with the delimiter in one procedure.

    For example,

    With input

    "A0020000A103A0A0A0A501A4A405A5A5A5A5A5"


    The output should be:

    HEADER LEN DATA
    ------------- ------ --------------
    A0 02 0000
    A1 03 A0A0A0
    A5 01 A4
    A4 05 A5A5A5A5A5


    Or

    With input :

    "B103X0X0X0C204B1B1B1B1A209C2C2C2C2C2C2C2C2C2X301A2"


    Output:

    HEADER LEN DATA
    ------------- ------ -----------------------
    B1 03 X0X0X0
    C2 04 B1B1B1B1
    A2 09 C2C2C2C2C2C2C2C2C2
    X3 01 A2

    Continue reading...

Compartilhe esta Página