How to set a ' - ' betwen number phone ? (470-605)
#1

I want my number to be 417-364

Do somebody have a string function that set a ' - ' between the numbers?

Reply
#2

DELETE.
Reply
#3

Assuming that all phone numbers are 6 digits long and stored as an integer, you can just use mod and division:
  • phone / 1000 to get the first 3 digits.
  • phone % 1000 to get the last 3 digits.
and then you can output them with an delimiter you want.

Or if the length is unknown and you dont want to do any fancy math tricks, look into strins.
Reply
#4

strins(string, "-", 3);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)