Skip to content

Convert ASCII string to a different case

License

Notifications You must be signed in to change notification settings

ubermanu/case.zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

case.zig

A set of functions to change the case of a string.

Install

zig fetch --save git+https://github.com/ubermanu/case.zig
const case_mod = b.dependency("case", .{});
exe.root_module.addImport("case", case_mod.module("case"));

Usage

const case = @import("case");

test {
    const allocator = std.testing.allocator;

    const str = try case.toPascalCase(allocator, "Some string");
    defer allocator.free(str);

    try std.testing.expectEqualStrings("SomeString", str);
}

About

Convert ASCII string to a different case

Topics

Resources

License

Stars

Watchers

Forks

Languages