A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/lodash-_-startcase-method/ below:

Lodash _.startCase() Method - GeeksforGeeks

Lodash _.startCase() Method

Last Updated : 20 Oct, 2023

Lodash _.startCase() method is used to convert the string to start case.

Syntax:
_.startCase( [string=''] );
Parameters: Return Value:

This method returns the start of the case string.

Example 1: In this example, we have used the _.startCase() method for converting the given string into the start case string.

JavaScript
// Requiring the lodash library  
const _ = require("lodash");  
     
// Use of _.startCase() method 
console.log(_.startCase('geeks for geeks')); 
console.log(_.startCase('geeksforgeeks'));
console.log(_.startCase('@#$%geeksforgeeks@#$%'));

Output:

'Geeks For Geeks'
'Geeksforgeeks'
'Geeksforgeeks'

Example 2: In this example, we have used the _.startCase() method for converting the given string into the start case string.

JavaScript
// Requiring the lodash library  
const _ = require("lodash");  
     
// Use of _.startCase() method 
console.log(_.startCase(null)); 
console.log(_.startCase('123456789'));
console.log(_.startCase("gfg.Id"));

Output:

''
'123456789'
'Gfg Id'


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4