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

Can we use LEFT(), RIGHT() and other String functions in Lightning component?

How to use string functions in lightning
Raj VakatiRaj Vakati
Hi Hemanth, 
To be clear, I didn't think there is no native javascript left() function. In lighting components, you are good to use most of the javascript string method like substring() etc. 

Coming into the Prototyping which is also working in lighting components( LEFT function ). 
 String.prototype.left = function(n) {
            return this.substring(0, n);