Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in camel case conversion #9

Closed
standy66 opened this issue Apr 29, 2020 · 1 comment · Fixed by #11
Closed

Bug in camel case conversion #9

standy66 opened this issue Apr 29, 2020 · 1 comment · Fixed by #11
Labels

Comments

@standy66
Copy link

Hi! I found a small bug in UpperCamelCase/LowerCamelCase conversion functions when they are applied on a string "XRequestId". The second letter (R) is not capitalized after conversion. Here is a code to reproduce:

package main

import (
	"fmt"
	"github.com/stoewer/go-strcase"
)

func main() {
	fmt.Println(strcase.UpperCamelCase("XRequestId"))
	fmt.Println(strcase.LowerCamelCase("XRequestId"))
}

Expected output:

XRequestId
xRequestId

What I actually got:

XrequestId
xrequestId
@stoewer
Copy link
Owner

stoewer commented Apr 29, 2020

Thanks you @standy66 for the bug report. I'll have a look at it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants