question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

String Manipulation Functions

See original GitHub issue

Ramda 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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
damiangreencommented, Apr 1, 2020

Also upperFirst, truncate would be useful

2reactions
char0ncommented, Feb 20, 2018

Cool 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found