5
I already have a function where it performs the conversion of strings for Slug.
Below I will give examples for facilitation in understanding my question.
3 examples before conversion:
link para uma página
link página
link
3 examples after conversion:
link-para-uma-pagina
link-pagina
link
So far so good, always used this function without major problems. Only now I found the need to use the format Camelcase starting from the Slug that I have.
I know there are countless possibilities of that being done, so I’m here to get the best possible answer.
A detail is that, would be a "almost" Camelcase, because regardless of the string, I need the first character to always be in lowercase.
3 examples after converting from Slug to "almost" Camelcase:
linkParaUmaPagina
linkPagina
link
Very good Yure, that’s right, just remembering that in this case would have to 'explode' in '-' and not in ' ', because the format of the string will already be in Slug format as I said in the question
link-para-uma-pagina
. And in this case it would not be necessary also removal of accents and similar.– Thyago ThySofT
So I’ve already made the change in function.
– Yure Pereira