RohanVashisht1234/zorsig
This repository has no description.
Features:
const std = @import("std");
const Zorsig = @import("zorsig");
const print = std.debug.print;
pub fn main() void {
const res1 = Zorsig.char_to_morse('A');
print("{s}\n", .{res1});
const res2 = Zorsig.morse_to_char(".-");
print("{c}\n", .{res2});
// No allocator
var res3 = Zorsig.morse_to_string(".... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--");
while (res3.next()) |next_element| {
print("{c}", .{next_element});
}
print("\n", .{});
var res4 = Zorsig.string_to_morse("HELLO, WORLD!");
while (res4.next()) |next_element| {
print("{s} ", .{next_element});
}
}
Run the following command in your terminal:
zig fetch --save "https://github.com/RohanVashisht1234/zorsig/archive/refs/tags/v0.0.1.tar.gz"
**Add the following to your build.zig (just above the line b.installArtifact(exe);
): **
const zorsig = b.dependency("zorsig", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zorsig", zorsig.module("zorsig"));