Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Zig String fork from zig-string

zig-string

This library is a UTF-8 compatible string library for the Zig programming language. I made this for the sole purpose to further my experience and understanding of zig. Also it may be useful for some people who need it (including myself), with future projects. Project is also open for people to add to and improve. Please check the issues to view requested features.

Basic Usage

const String = @import("./zig-string.zig").String;
// ...

// Use your favorite allocator
var arena = ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();

// Create your String
var myString = String.init(&arena.allocator());
defer myString.deinit();

// Use functions provided
try myString.concat("πŸ”₯ Hello!");
_ = myString.pop();
try myString.concat(", World πŸ”₯");

// Success!
assert(myString.cmp("πŸ”₯ Hello, World πŸ”₯"));

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages