30秒学会 JavaScript 片段 – stringPermutations
Generates all permutations of a string (contains duplicates). ⚠️ WARNING: This function’s exec...
Generates all permutations of a string (contains duplicates). ⚠️ WARNING: This function’s exec...
Capitalizes the first letter of a string. Use String.toUpperCase() to capitalize first letter and St...
Checks if the given argument is a string. Only works for string primitives. Use typeof to check if a...
Returns true if the given string is a palindrome, false otherwise. Convert the string to String.prot...
Checks if a string is upper case. Convert the given string to upper case, using string.ToUpper() and...
Reverses a string. Use string.ToCharArray() to convert the string to an array of char, Array.Reverse...
Clones a regular expression. Use new RegExp(), RegExp.source and RegExp.flags to clone the given reg...
Returns true if the given string is lower case, false otherwise. Convert the given string to lower c...
Converts a string to snake case. Use Regex.Matches() with an appropriate regular expression to break...
Replaces all but the last num of characters with the specified mask character. Use String.prototype....