String Multitool

String Multitool

Alfred workflow with handy string transforming tools.

Usage

Use keyword string (or custom keyword) to init String Multitool. Provide string as an argument and select needed transformation from list.

Chaining transformations

You can also chain transformations by providing transformation commands after / char.

For example:

Some string THat we need to use as variable Name! /lc

/lc command lowercases the string and then camelcases it yielding the result:

someStringThatWeNeedToUseAsVariableName

Commands

Lowercase /l

Lowercase all chars.

SAY HELLO TO MY LITTLE FRIEND! /lsay hello to my little friend!

Uppercase /u

Uppercase all chars.

Can you hear me Major Tom? /uCAN YOU HEAR ME MAJOR TOM?

Pascalcase /p

Convert string to pascalcase and remove all non-word and non-digit chars.

The quick brown fox jumps over the lazy dog /pTheQuickBrownFoxJumpsOverTheLazyDog

Camelcase /c

Convert string to camelcase and remove all non-word and non-digit chars.

is error state! /cisErrorState

Snakecase /s

Convert string to snakecase and remove all non-word and non-digit chars.

is error state! /sis_error_state

Trim /t

Remove space-like chars from start and end of the string.

Well, something is happening... /tWell, something is happening...

Capitalize /a

Capitalize first char of each word.

The quick brown fox jumps over the lazy dog /aThe Quick Brown Fox Jumps Over The Lazy Dog

Slugify /S '<replacement>'

Remove all non-word and non-digit chars and merge words with specified replacement string. If no replacement argument is provided, Slugify uses - char as an argument.

http://foo.bar/baz/brrr /S '+'http+foo+bar+baz+brrr

Replace /R '<substring>' '<replacement>'

Replace all substring occurences with replacement string. If no replacement argument is provided, Replace uses empty string as an argument.

I'm Will, Will's son /R 'Will' 'Bill'I'm Bill, Bill's son