String Manipulation Functions
See original GitHub issueRamda already has:
Under discussion:
1. Case
- capitalize
2. Formatting
Proposed:
1. Case
- toSnakecase
alpha_beta
- toKebabCase / dasherize
alpha-beta
- toCamelCase
alphaBeta
- to PascalCase / alias: toUpperCamelCase
AlphaBeta
- toTitleCase
Alpha Beta
/ alias: toStartCase Ref: lodash.startCase - toDotCase
alpha.beta
- toMacroCase / alias: toScreamingSnakeCase
ALPHA_BETA
2. Formatting
- wrap()
wrap("'")('alpha')
->'alpha'
/wrap('[', ']')('alpha')
->[alpha]
3. Whitespace
- compressWhitespace Reduce all whitespace to a single space per section of whitespace
- stripWhitespace Remove all whitespace
- stripLinebreaks Remove linebreaks
- dedent Ref: npm(https://www.npmjs.com/package/dedent)
- wordWrap Ref: Rails Wrap lines to x chars
4. Inflection Ref: lodash-inflection, Ref node-inflection
- deburr Ref: lodash.deburr Remove accented chars
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:20 (11 by maintainers)
Top Results From Across the Web
String Manipulations In C Programming Using Library Functions
In this article, you'll learn to manipulate strings in C using library functions such as gets(), puts, strlen() and more. You'll learn to...
Read more >C Programming/String manipulation - Wikibooks
The more commonly-used string functionsEdit · The strcat functionEdit · The strchr functionEdit · The strcmp functionEdit · The strcpy functionEdit · The...
Read more >List and explain string manipulation functions - Estudies4you
List and explain string manipulation functions · 1. strlen() function · 2. strcpy() Function · 3 strcat() Function · 4. strcmp() Function ·...
Read more >10.1. Manipulating Strings
Extracts $substring at end of $string, where $substring is a regular expression. Deletes shortest match of $substring from front of $string. Deletes longest ......
Read more >Lesson 13 : String Manipulation Functions
Lesson 13 : String Manipulation Functions · Len (“Phrase”) · Right (“Phrase”, n) · Left(“Phrase”, n) · Ltrim(“Phrase”) · Rtrim(“Phrase”) · Trim(“Phrase”) ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also
upperFirst
,truncate
would be usefulCool so we’ll combine these two into deburr
This is lodash deburr implementation. As it seems my utils solve only part of the problem. There are other problems to solve. But we should refrain from copying the from lodash to avoid licensing issues and do our own research.
deburr
is priority now because it’s the base for lot of other string utility functions.