|
-
Aug 22nd, 2016, 04:43 AM
#1
Thread Starter
Member
String Manipulation
Hi all I have a string
1234567789485116 and what I would like to do is to blank out every number apart from the last 5 so it would look like this **********85116 how would i do this?
Andy
-
Aug 22nd, 2016, 04:51 AM
#2
Re: String Manipulation
You can use String.Length to determine how long your String is. You can then use String.Substring to get the last 5 characters based on that length. You can also then create a new String of that same length full of asterisks. Finally, just concatenate those two substrings.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|