Skip to content

Latest commit

 

History

History
264 lines (169 loc) · 3.92 KB

README.org

File metadata and controls

264 lines (169 loc) · 3.92 KB

NAME

cl-change-case — Convert strings between camelCase, param-case, PascalCase and more

VERSION

0.2.0

SYNOPSIS

(use-package :cl-change-case)

(format t "~{~S~%~}"
        (list (camel-case "test string")
              (param-case "test string")
              (pascal-case "test string")))

DESCRIPTION

cl-change-case is library to convert strings between camelCase, PascalCase, snake_case, param-case, CONSTANT_CASE and more.

This is a Common Lisp port of blakeembrey/change-case released under The MIT License.

Functions

lower-case

Return the string in lower case.

(lower-case "TEST STRING")

lower-case-first

Lower case of the first character of string.

(lower-case-first "TEST STRING")

string-lower-case-p

Test if all characters in string have lower case.

(string-lower-case-p "test string")

upper-case

Return the string in upper case.

(upper-case "test string")

upper-case-first

Upper case the first character of string.

(upper-case-first "test string")

string-upper-case-p

Test if all characters in string have upper case.

(string-upper-case-p "TEST STRING")

no-case

Make string a lower case, space separated string.

(no-case "test_stringTest")

Optionally you can provide a different replacement string.

(no-case "test_stringTest" :replacement "$$")

camel-case

Convert string to camelCase.

(camel-case "test_string")

dot-case

Convert string to dot.case.

(dot-case "Test String")

header-case

Title case string but dash separated.

(header-case "test string")

param-case

Convert string to param-case.

(param-case "test string")

pascal-case

Convert string to PascalCase.

(pascal-case "test string")

path-case

Convert string to path/case.

(path-case "test string more")

sentence-case

Makes string a lower case, space separated string with the first word capitalized.

(sentence-case "thisIsATestString")

snake-case

Convert string to snake_case.

(snake-case "test string")

swap-case

Reverse the case of each character in string.

(swap-case "PascalCase")

title-case

Make string space separated with each word capitalized.

(title-case "this_is a_test_string")

constant-case

Convert string to CONSTANT_CASE.

(constant-case "test string")

AUTHOR

Sebastian Christ (mailto:[email protected])

COPYRIGHT

Copyright (c) 2016 Sebastian Christ ([email protected])

Released under the LLGPL license.

SEE ALSO