How to replace only the first character of string

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Hello!

I would like to replace only the first character of a string.

For example if I have 21232, I need to replace only the first figure 2 with "" (blank) in order to get returned 1232.

If I would use StrReplace, I will get of course 13, because all three "2" will be replaced.

Is there some function for replacing only the first character? Somehow StrIndexOf, I could not find it in help topics.

Thanks a lot in advance!

 
#2
People who like this:0Yes/0No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Oops!

What I needed was:

Code
CustomerNumber = Right(CustomerNumber, StrLen(CustomerNumber)-1);

I got the result I wanted to get :)

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.