Skip to content

Added string from stdlib #21

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Fable.Python.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<Compile Include="stdlib/Os.fs" />
<Compile Include="stdlib/Queue.fs" />
<Compile Include="stdlib/Sys.fs" />
<Compile Include="stdlib/String.fs" />
<Compile Include="stdlib/Time.fs" />
<Compile Include="stdlib/TkInter.fs" />

Expand Down
22 changes: 22 additions & 0 deletions src/stdlib/String.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module Fable.Python.String

open Fable.Core

// fsharplint:disable MemberNames

type IExports =
abstract ascii_letters: string
abstract ascii_lowercase: string
abstract ascii_uppercase: string
abstract digits: string
abstract hexdigits: string
abstract octdigits: string
abstract punctuation: string
abstract printable: string
abstract whitespace: string
abstract capwords : string -> string
abstract capwords : string * string -> string

/// A collection of string constants
[<ImportAll("string")>]
let string: IExports = nativeOnly