User Tag List

Results 1 to 3 of 3

Thread: How to remove a letter at an index?

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    How to remove a letter at an index?

    How do I remove a letter in a string from the end, start or at any given index of a string?

    i.e.: take the string "blah blah blah" and remove the last letter making the string "blah blah bla".

    Thanks

  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)
    To remove the last letter, use Left$(String, Len(String)-1)

    Stochastic Utility, however, has Substring$ which is equivalent to PHP's substr, and accepts both a negative start and length value (which counts from the end instead of the beginning. To remove the last letter with Stochastic Utility, use:

    Substring$( "Stochastic Utility 1.2", String, 0, -1)

    In MMF3, I hope mid$ is replaced by how Stochastic Utility works. It's identical to mid$ with positive values, but the support for negative values adds more functionality.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    You really don't need an extension for something this simple:

    String = Left$( String , #Char ) + Right$( String , Len( String ) - #Char - 1 )
    ...where #Char is the character to remove, with the first character being 0

Similar Threads

  1. Letter-individual checking
    By INViSAR in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 11th March 2011, 06:41 AM
  2. Letter-by-letter text - next line if word too long
    By DistantJ in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th February 2008, 06:51 AM

Posting Permissions

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