Skip to content

Standard library #5

Open
Open
@georgelemon

Description

Tim should borrow some callable utilities from Nim's standard library

Tim's standard library in modules:
std/system, std/strings, std/arrays, std/objects, std/math and std/os (read-only functions)

var x = "Hello"
echo len($x)     // 5
echo $x.len      // 5 (UCS style)

echo $x.encode.len   // 8
// equivalent of 
echo len(encode($x)) // 8

@import "std/strings"
echo $x.contains("o")

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions