python-stringcase icon indicating copy to clipboard operation
python-stringcase copied to clipboard

Spaces are not removed from camelCase()

Open TheOtherDude opened this issue 8 years ago • 1 comments

This is pretty easy to reproduce, but my specific test case is 'Managed Service' => 'managed Service'

TheOtherDude avatar Jul 30 '17 22:07 TheOtherDude

The question is this: Design or Flaw? How should a string like 'Managed Service' be understood in the first place? As one word with an internal space or two distinct ones separated by space.

The camelcase function should actually replace spaces, though according to code.

Yet, related is the following behavior, clearly a bug: TitleCase duplicates spaces for me.

'Managed . Service' => Managed .. Service' (dots mean spaces here for better legibility.)

As titlecase() wraps camelcase(). Similar errors for other functions wrapping camelcase()

pykong avatar Aug 04 '17 21:08 pykong