google / google/codeworld

Add a `Text` substring function in codeworld-base

Aperta
#446 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Haskell
Stelle
1.3k
Fork
201
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

It would be great to add a function to get a subrange of a `Text` value in `codeworld-base`. Something like:

subtext :: (Text, Number, Number) -> Text
subtext (t, a, b) = T.take (b - a) (T.drop a t)

but with appropriate validation for non-integer parameters, etc.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.