JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

string/trim

core-api


    cfunction
    src/core/string.c on line 620, column 1

    (string/trim str &opt bytes)

    Trim leading and trailing whitespace from a byte sequence `str`. If 
    argument `bytes` is provided, treat only characters in `bytes` as 
    whitespace.


1 exampleSign in to add an example
Loading...
(string/trim " foo ")  # => "foo"
(string/trim "_!_foo_!_" "_!")  # => "foo"
cellularmitosisPlayground