User Tag List

Results 1 to 2 of 2

Thread: Get line in string?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get line in string?

    I keep failing to get the text of a specific line from a string.

    To a certain degree it works, both Jam's 2D tokenizer and the String Parser extension can successfully tokenize a string with newline$ being the delimiter - but both of them does not consider that an empty element is an element too. For example, in the string "a/b//c" (delimiter: "/") element 0 is a, element 1 is b, and element 2 (not 3) is c rather than being empty. Normally, this behavior is just what I want, but in this case it means I'm missing the empty lines in my string.

    Does any of you know a simple way to get the text of a specific line within a string? The empty lines must count as lines too!

    [color:#FF0000]Edit:[/color] Oh wait, I realize that Newline$ consists of many Ascii chars. Perhaps I can use only the first as a delimiter, so that the rest will be used to ensure that even empty strings does have some kind of content...

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get line in string?

    Erm, NM, problem solved. I was considering to remove the post above, but if anyone is interested in the solution, I tokenized the string with Jam's 2D tokenizer using Left$(NewLine$, 1) as the delimiter. Then when reading the elements, I used Mid$(Element$( "Tokenizer", [Line to get]), Min([Line to get],1), 65535)

Similar Threads

  1. Beta 28 -- Double spaces in string cause line break
    By Jeff in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 17th May 2012, 05:36 PM
  2. define the line spacing with String object
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th February 2011, 06:42 PM
  3. Need a draw line & make active follow line example
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th January 2011, 09:50 AM
  4. Change List Object Line Color - One Line Only?
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 21st December 2008, 05:58 PM
  5. Clearing the top line of text is String Parser.
    By ACESpark in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th June 2007, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •