Skip to content

Commit 12c521d

Browse files
author
Evan Cobb
committed
documenting UppercaseFirst
1 parent b7ae029 commit 12c521d

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/utils/string/UppercaseFirst.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@
55
*/
66

77
/**
8-
* [description]
8+
* Capitalizes the first letter of a string if there is one.
9+
* @example
10+
* UppercaseFirst('abc');
11+
* // returns 'Abc'
12+
* @example
13+
* UppercaseFirst('the happy family');
14+
* // returns 'The happy family'
15+
* @example
16+
* UppercaseFirst('');
17+
* // returns ''
918
*
1019
* @function Phaser.Utils.String.UppercaseFirst
1120
* @since 3.0.0
1221
*
13-
* @param {string} str - [description]
22+
* @param {string} str - The string to capitalize.
1423
*
15-
* @return {string} [description]
24+
* @return {string} A new string, same as the first, but with the first letter capitalized.
1625
*/
1726
var UppercaseFirst = function (str)
1827
{

0 commit comments

Comments
 (0)