okunishinishi / python-stringcase

String case converter for python.
https://pypi.python.org/pypi/stringcase
MIT License
206 stars 36 forks source link

Bug in version of stringcase pushed on pypi #8

Open flou opened 7 years ago

flou commented 7 years ago

Hello,

I think that the version of stringcase currently available on Pypi contains a bug. The camelcase function removes more characters than needed:

$ virtualenv .venv
New python executable in /Users/flou/.venv/bin/python2.7
Also creating executable in /Users/flou/.venv/bin/python
Installing setuptools, pip, wheel...done.

$ source .venv/bin/activate
(.venv) $ pip install stringcase
Collecting stringcase
Installing collected packages: stringcase
Successfully installed stringcase-1.2.0

(.venv) $ python
Python 2.7.13 (default, Jul 18 2017, 09:17:00)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import stringcase
>>> stringcase.camelcase('foo-bar')
'foar'
>>> stringcase.pascalcase('foo-bar')
'Foar'
pykong commented 7 years ago

I did not consider my PR release ready, as stated in the comments: https://github.com/okunishinishi/python-stringcase/pull/6

Especially since I modified the CamelCase method, as one suggestion to address https://github.com/okunishinishi/python-stringcase/issues/5

We need to discuss changes and the rerelease.

lexruster commented 3 years ago

Bug still there, 4 years later, just FYI