DEV Community

One line of code (JS) Series' Articles

Back to Martin Krause's Series
1 line of code: How to PascalCase a string
Cover image for 1 line of code: How to PascalCase a string

1 line of code: How to PascalCase a string

5
Comments
1 min read
1 line of code: How to create an URL Slug from a string
Cover image for 1 line of code: How to create an URL Slug from a string

1 line of code: How to create an URL Slug from a string

7
Comments 4
1 min read
1 line of code: How to convert html special chars
Cover image for 1 line of code: How to convert html special chars

1 line of code: How to convert html special chars

5
Comments
1 min read
1 line of code: How to lower case a string
Cover image for 1 line of code: How to lower case a string

1 line of code: How to lower case a string

6
Comments 1
1 min read
1 line of code: How to convert tabs to spaces
Cover image for 1 line of code: How to convert tabs to spaces

1 line of code: How to convert tabs to spaces

19
Comments 9
1 min read
1 line of code: How to convert spaces to tabs
Cover image for 1 line of code: How to convert spaces to tabs

1 line of code: How to convert spaces to tabs

18
Comments 3
1 min read
1 line of code: How to convert \newlines to <breaks />
Cover image for 1 line of code: How to convert \newlines to <breaks />

1 line of code: How to convert \newlines to <breaks />

7
Comments 5
1 min read
1 line of code: How to replace multiple spaces with one space
Cover image for 1 line of code: How to replace multiple spaces with one space

1 line of code: How to replace multiple spaces with one space

18
Comments 1
1 min read
1 line of code: How to reverse all words of a string
Cover image for 1 line of code: How to reverse all words of a string

1 line of code: How to reverse all words of a string

28
Comments 6
1 min read
1 line of code: How to reverse a string
Cover image for 1 line of code: How to reverse a string

1 line of code: How to reverse a string

31
Comments 10
1 min read
1 line of code: How to truncate a string at word boundaries
Cover image for 1 line of code: How to truncate a string at word boundaries

1 line of code: How to truncate a string at word boundaries

10
Comments 3
1 min read