Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of fromText should be updated for compatibility with text-2 #34

Closed
sjakobi opened this issue Jul 15, 2022 · 0 comments · Fixed by #36
Closed

Documentation of fromText should be updated for compatibility with text-2 #34

sjakobi opened this issue Jul 15, 2022 · 0 comments · Fixed by #36

Comments

@sjakobi
Copy link
Contributor

sjakobi commented Jul 15, 2022

-- | \(\mathcal{O}(n)\) Construct 'ShortText' from 'T.Text'
--
-- This is currently not \(\mathcal{O}(1)\) because currently 'T.Text' uses UTF-16 as its internal representation.
-- In the event that 'T.Text' will change its internal representation to UTF-8 this operation will become \(\mathcal{O}(1)\).
--
-- @since 0.1
fromText :: T.Text -> ShortText

Note that O(1) is true only for the best case where the Text represents the full underlying ByteArray# rather than a slice of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants