google / google/codeworld

Add a `Text` substring function in codeworld-base

Open
#446 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.