size_t
The size_t
and usize_t
types for Crystal, because we for some reason don't
already have them.
Installation
- Add the dependency to your
shard.yml
:
dependencies:
size_t:
github: Proximyst/size_t.cr
- Run
shards install
Usage
require "size_t"
# Use the usize_t/USize type:
typeof(Sizes::USize) # (64-bit processor) => UInt64
# (32-bit processor) => UInt32
# Use the size_t/ISize type:
typeof(Sizes::ISize) # (64-bit processor) => Int64
# (32-bit processor) => Int32
Contributors
- Mariell Hoversholm - creator and maintainer