function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shravanshravan 

How to check the unbreakable word in apex

Hi,

 

how to check unbrekable word in apex:

 

Ex: String name1 = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; // unbrekable word

       

Don't check  if name1 like  ' ' (space).

 

 

Please Reply ASAP

 

Regards,

Shravan

 

cvuyyurucvuyyuru

unbreakable word in the sense??

 

lanecwelanecwe

If you mean how to check the space in between, use contains method. Ie. name1.contains(' ')

shravanshravan

 boolean flag = name.contains(' ');

 

like this to check the spaces