Saturday, December 28, 2024
Google search engine
HomeLanguagesJavascriptLodash String Complete Reference

Lodash String Complete Reference

Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. Lodash String functions are used to perform operations on the string elements.

Methods

Description

_.camelCase() It is used to convert a string into a camel case string.
_.capitalize() It converts the first character of string to upper case and the remaining to lower case.
_.deburr() It converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.
_.endsWith() It checks whether the string ends with the given target string or not.
_.escape() It converts the characters “&”, “<“, “>”, ‘”‘, and “‘” of given string into their corresponding HTML entities.
_.escapeRegExp() It is used to escape the Regular Expression special characters in string.
_.kebabCase() It converts the given string into kebab case string.
_.lowerCase() It converts the given string, as space separated words, to lower case.
_.lowerFirst() It converts the first character of the given string into lower case characters.
_.pad() It is used to pad the string on left and right sides if it is shorter than the given length.
_.padEnd() It is used to pad a string with another string until it reaches the given length.
_.padStart() It is used to pad a string with another string until it reaches the given length.
_.parseInt() It is used to parse a string argument and returns an integer of the specified radix.
_.repeat() It is used to repeat the given string n times.
_.replace() This method replace the matches for pattern in string with replacement.
_.snakeCase() It is used to convert string to snake case.
_.split() It splits the given string by the given separator and up to the given limit length.
_.startCase() It is used to convert the string to start the case.
_.startsWith() It is used to find if the string starts with the given target string or not.
_.template() It is used to create a template function.
_.toLower() It converts the entire string to lower case.
_.toUpper() It converts the entire string to Upper case.
_.trim() It removes leading and trailing white spaces or specified characters from the given string.
_.trimEnd() It removes trailing white spaces or specified characters from the end of the given string.
_.trimStart() It removes leading white spaces or specified characters from the given string.
_.truncate() It is used to truncate the stated string if it is longer than the specified string length.
_.unescape() It convert HTML entities into given string to their corresponding characters.
_.upperCase() It converts the entire string to as space-separated words, to upper case.
_.upperFirst() It converts the first character of the string to the upper case.
_.words() It splits the given string into an array of words.
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

RELATED ARTICLES

Most Popular

Recent Comments