freshcoders / discorki

MIT License
1 stars 0 forks source link

Change the slug function #49

Closed ikdekker closed 1 year ago

ikdekker commented 1 year ago
    Generally not a fan of naming something StringUtil.

There is a Spring StringUtils, which actually does string operations (like trimming, capitalizing). Whereas this one is cleaning a champion name (transforms to slug + uppercases first letter). We might prefer using a transform like this https://stackoverflow.com/questions/57298658/how-do-i-create-a-url-slug-extension in some capacity (if this is valid code).

_Originally posted by @ikdekker in https://github.com/freshcoders/discorki/pull/48#discussion_r1030737833_

jessedezwart commented 1 year ago

Yep, much better.