Skip to content

Commit

Permalink
feat: Adiciona método para transformar em minúsculas
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfeitosa committed Dec 24, 2023
1 parent 22a37b2 commit b8d7451
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ptst/texto.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,8 @@ func init() {
TipoTexto.Mapa["maiusculas"] = NewMetodoOuPanic("maiusculas", func(inst Objeto, iter Objeto) (Objeto, error) {
return Texto(strings.ToUpper(string(inst.(Texto)))), nil
}, "transforma todas as letras em maiúsculas")

TipoTexto.Mapa["minusculas"] = NewMetodoOuPanic("minusculas", func(inst Objeto, iter Objeto) (Objeto, error) {
return Texto(strings.ToLower(string(inst.(Texto)))), nil
}, "transforma todas as letras em minúsculas")
}

0 comments on commit b8d7451

Please sign in to comment.