Discussions

SmileBASIC Community

noone4113TA

06/23/2016 4:14 AM ·Spoilers

Open Closed

String - letters help wanted

Now, say I have XDF in one string. Now I add PDF to it. Simple, right? But then the question begs: if i want to remove DF from PDF, without typing it already(making a preset string that already says XDFP), how will I do this. Thanks in advance

Advertisement

Comment

This post has no comments.

  • You can use the LEFT$ function to return a string with a specified amount of characters from the left of another specified string. That means you can do something like A$="XDF" 'START WITH XDF INC A$,"PDF" 'CONCATENATE PDF A$=LEFT$(A$,LEN(A$)-2) 'EXTRACTS A STRING FROM A$ THAT'S THE LENGTH OF A$ MINUS 2 (REMOVES LAST 2 LETTERS)

    Yeahs1
    Played
  • There's also the RIGHT$ function, which does the same thing but extracts the string starting from the right. There's also MID$, which begins extracting from a specified start position.

    Yeahs1
    Played
  • Dang... Thank you!

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-BXN-3HKR-7GB-LP88

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: