Results 1 to 5 of 5

Thread: Assigning a string that contains '

  1. #1
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default Assigning a string that contains '

    This problem is rather tricky:
    MyString:='ab';
    But let's say you want a ' between ab:
    MyString:='a'b';
    It's not going to work since ' interferes with the assignment.

    A possible but extremely stupid solution would be to do
    ThatAnnoyingSymbol:=GetPage(an url that contains ');
    MyString:='a'+ThatAnnoyingSymbol+'b';

    Is there any easier method to get around it or must i simply avoid having ' in string? (i'm using it in a Between function btw)

  2. #2
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    I think if you want to say "I'm" you can use
    Simba Code:
    Writeln('I''m');
    where you use two '' between the I and m.
    Solar from RiD.

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Solar View Post
    I think if you want to say "I'm" you can use
    Simba Code:
    Writeln('I''m');
    where you use two '' between the I and m.
    Wow never knew it works like this. Thanks!

  4. #4
    Join Date
    Dec 2011
    Location
    Holland
    Posts
    545
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    If you want to have one of these in a string:


    Then you can use:
    Simba Code:
    writeln('That looks like a C: '#128', but idk the official name.');

  5. #5
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Quote Originally Posted by Chris View Post
    If you want to have one of these in a string:


    Then you can use:
    Simba Code:
    writeln('That looks like a C: '#128', but idk the official name.');
    Nice! I never knew that was possible.
    By the way, that letter(รง) is a letter in my language's alphabet, and it's use to make the "ch" sound, like when you say "charity" or "charm".
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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