Jump to content
UBot Underground

Making a variable less than 10 characters


Recommended Posts

Well, after the success of my first couple of bots last night I have started to develop one a bit further and have hit my next snag :)

 

If I have a variable, how can I make it less than 10 characters long.

 

My username variable is made up of $username + a random number between 1 and 3000 added to the end, so for example:

thisisalongusername421

 

My question is how do I cut that down to either:

thisisalon

 

or, what would be better for me would be:

sername421

 

Once again, thanks for reading this!!

Link to post
Share on other sites

This weekend I should be making my PHP addon for this.

 

One of the functions I am planning on doing is character length.

 

But you might be able to do this with javascript too. Just not familiar with it.

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
Reply to this topic...

×   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.

Loading...
×
×
  • Create New...