Results 1 to 3 of 3

Thread: [Resolved] Insert Space Every X Character

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    [Resolved] Insert Space Every X Character

    Hello, I've been racking my brain out trying to figure out how to do this!

    What i want to do is Insert a space every X character so like if i wanted a space every 3 characters...

    "HelloEveryoneHowAreYouGoing?I'mFine!"
    to
    "Hel loE ver yon eHo wAr eYo Goi Ng? I'm Fin e!"

    Some of the problems that i have is when i insert a space the length of the string changes and i need to count four instead of 3 for the changed bit. Also with the maths, does it effect it if the string length doesn't divide by 3 completely (such as above)?

    Can you please help me come up with this code!
    Last edited by Slyke; May 17th, 2006 at 01:11 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
  •  



Click Here to Expand Forum to Full Width