Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > How to replace only the first character of string

Forum

Search UsersRules
How to replace only the first character of string
#1
Interested
Points:: 0
Joined:: Nov 10, 2011

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!

Profile
#2
Interested
Points:: 0
Joined:: Nov 10, 2011

Oops!

What I needed was:

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

I got the result I wanted to get :)

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.