What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-22 22:47:06
javascript capitalize
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Other 2021-10-19 16:54:06
make first letter uppercase
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-10-14 03:38:10
javascript escape regex
// Vanilla JS function escapeRegex(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } // Or with npm: npm install escape-string-regexp const escapeRegex = require('escape-string-regexp'); // Usage: const regex = new RegExp(escapeReg... Add solution -
Dart 2021-10-13 16:19:09
flutter replace character in string
newString = 'resume'; newString.replaceAll('e', 'é'); // it returns the string 'résumé' // And you can use a regex to search like a needle in a haystack: 'resume'.replaceAll(RegExp(r'e'), ‘é’); // 'résum&e... Add solution
Best helpers
Grin
+5
Hwsolutions
+5
SYJ
+5
A. Pelicker
+5
KMC
+5
Jonjie
+5
Blank
+5
Paul Knight
+5
WYSIWYG
+5
Required
+5
Saylestyler
+5
Deverejones
+5
Frank Jaeger
+5