#37 str_sep fix

closed-fixed
nobody
None
5
2011-08-12
2011-04-14
No

My friend Christian Wimmer (user brandy25) found and fixed a bug in the str_sep() function. The bug is described below and the patch to fix it is attached. Please consider applying it.

If the separation string ('dfa') has more than one character then the output is sometimes wrong as in this example:
GDL>print,str_sep('ahasadfasdf','dfa')
h s s
The correct result would be
GDL>print,str_sep('ahasadfasdf','dfa')
ahasa sdf

Regards,
-Fernando Silveira

Discussion

  • Alain C.
    Alain C.
    2011-08-12

    Thanks for the report
    Sorry for the delay

    I do create this bug making some "improvments" in the STRSPLIT code, I am working on it and hope to solve STR_SEP at the same time, without changing it. (If not, I will consider more seriously this patch.)

     
  • Alain C.
    Alain C.
    2011-08-12

    • status: open --> open-fixed
     
  • Alain C.
    Alain C.
    2011-08-12

    This bug is now corrected, only STRSPLIT has been changed.
    Please report (maybe better in the bug section) any other problems related to STR_SEP or STRSPLIT

    sorry for the mess.
    Alain

     
  • Alain C.
    Alain C.
    2011-08-12

    please create a new entry if needed

     
  • Alain C.
    Alain C.
    2011-08-12

    • status: open-fixed --> closed-fixed