String Parser: finding Newline$ among other delimeters?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have a loop that runs through a Rich Edit, based on " " and NewLine$ being delimeters. It adds each element as a line in a list. In the end, I'm left with a list containing each word in the Rich Edit. The thing is, if there are any line breaks (Newline$) in that Rich Edit, the element count and the list line count are out of sync. To fix this, I need a blank line to be added into the list whenever NewLine$ delimeter is found. I can't seem to make this work. I'm questioning if NewLine$ doesn't work as a delimeter.

    Does anyone have ANY idea what could be done? This issue is causing me some major grief. :(

  • Hi everyone,
    Be careful when using Rich Edit object, if you are enabling use of Rich Edit 2.0 library, newlines are encoded with only one character (CR) and not with two characters (CR + LF). It may be the reason why String Parser is not splitting the string properly.

    To ensure compatibility with most of input strings, it could be interesting to replace NewLine$ (which is CR + LF) to Right$(NewLine$,1) (which will be LF) and Left$(NewLine$,1) (which is CR) to Right$(NewLine$,1) (again LF character).
    ouly

    See Please login to see this link.

    Please login to see this link.

  • Maybe try to use a linechange as the delimiter instead of NewLine$

    Try to copy this:

    "
    "

    And paste it in as a delimiter

    You can copy a newline character by going into notepad, writing something short in to lines and then copy it in to the expression editor and remove the letters.

    EDIT: when copying the newline posted above between the "", there might be a space there that you need to remove.

  • By the way, another option that may be interesting some times: String Parser seems to skip empty elements, therefore adding NewLine$, Right$(NewLine$,1) and Left$(NewLine$,1) as delimiters may produce the same result.

    Another thing: here I assume that NewLine$ is CR + LF. I don't have any experience with CF's exporters, it could not be the case on all platforms. In this case, it could be better to add sequences using chr$( "String Parser", 13) and chr$( "String Parser", 10). In addition, when using Unicode input strings, it could be even different and everything said about NewLine$ and its use may be unapplicable.

    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!