+ Start a Discussion
plapla 

Lenght string function

Hello,

 

what's the string function to get the lenght of a string? I want to know the lenght of the string below. Please advise

 

example:  78YUJC865W

 

thanks

Paul

 

Arun MKArun MK

 

Hi,

 

If you are trying to find out the length in Apex Code it is something like this.

 

String myString = 'abcd';
Integer result = myString.length();

 

If it is a Visulaforce Page,

 

{!LEN("abcd")}

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

 

Regards,

Arun.

plapla

Thanks for your prompt reply.

However I used something like below, I got the error message that says "Method does not exist or incorrect signature"

 

if ((AccountNum).lenght() > 1)

 

Please advise.

I used this in Apex code.

 

thanks

Paul

 

plapla

Please disregard my previous message. it worked now. it was a typo. (lenght instead of length)

 

Thanks for your help

Paul

 

Arun MKArun MK

You are welcome.

 

If my post was helpful please throw KudosIf that post solved your problem kindly mark it as solution.

 

Regards,

Arun.