Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added regex category, and few case change snippets in string manipulation JavaScript. #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Mathys-Gasnier merged 5 commits into quicksnip-dev:main from aumirza:main
Dec 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feat(data:Js): Add utility function to convert strings to Title Case
  • Loading branch information
aumirza committed Dec 31, 2024
commit 60a66621a9db8a438b751a0eb40d4451970680fb
14 changes: 14 additions & 0 deletions public/data/javascript.json
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,20 @@
],
"tags": ["string", "case", "camelCase"],
"author": "aumirza"
},
{
"title": "Convert String to Title Case",
"description": "Converts a given string into Title Case.",
"code": [
"function toTitleCase(str) {",
" return str.toLowerCase().replace(/\\b\\w/g, (s) => s.toUpperCase());",
"}",
"",
"// Example usage:",
"console.log(toTitleCase('hello world test')); // Output: 'Hello World Test'"
],
"tags": ["string", "case", "titleCase"],
"author": "aumirza"
},
{
"title": "Remove Vowels from a String",
Expand Down

AltStyle によって変換されたページ (->オリジナル) /