Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
omard2000

Insert A Character After 7 Characters (C#) [SOLVED]

Question

Hey guys,

 

So each player in my game has a seven digit number that they are assigned. For example, if a player has an ID number of 0002232, how would I make it so that the ID number in game appears 000-2232. Basically, after three characters I want to add a "-".

 

Thanks! :)

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Maybe a for loop with the

Please login or register to see this code.

array which you split into 2(or more) parts, then show the first one, the "-", and the second part. Use the array length to determine how you want to split it.

Share this post


Link to post
Share on other sites

  • 0
Please login or register to see this quote.

 

Actually, I found an easier way.

 

Please login or register to see this code.

Thanks :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...