Skip to content

Added string from stdlib #21

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

delneg
Copy link
Contributor

@delneg delneg commented Oct 29, 2021

Some functions from "string", although I'm struggling with 'Template' and 'Formatter' classes. (https://github.com/python/typeshed/blob/master/stdlib/string.pyi#L22)
How should they be bind ? Is there any example .. ?
Maybe it's using [] or some other way

@dbrattli
Copy link
Collaborator

For string format I was planning to do this:

type System.String with
    [<Emit("$0.format($1...)")>]
    member self.format([<ParamArray>] args: Object[]) = nativeOnly

Is it something similar you need to do for the Formatter class? I've btw added a TestString.fs file, so you can add more unit-tests there for string handling.

@dbrattli
Copy link
Collaborator

Some features like named arguments for format is currently blocked by #18

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants