Library★ 2updated Jul 2018MITPAWNsampctl
Open on GitHubInstall with sampctl
sampctl package install Sreyas-Sreelal/pawn-humanize
Run this in your project folder. sampctl downloads the package and what it depends on.
Try it in the Pawn compiler →
Adds its include files, with the libraries it depends on, to the Pawn compiler in your browser, ready to include in a script.
Depends on 1 package
- sampctl/samp-stdlibnot in this directory
README.md
pawn-humanize
Pawn-humanize is a library inspired by go-humanize that makes stuff computers can read easily, more readable for humans.
Installation (Sampctl)
Simply install to your project:
sampctl package install thecodeah/pawn-humanize
Include in your code and begin using the library:
#include <humanize>
Features
Commas
0 -> 0
100 -> 100
1000 -> 1,000
1000000 -> 1,000,000
-100000 -> -100,000
HumanizeComma(integer, dest[], maxLength = sizeof dest)
Colors
0xA86420FF -> "Chocolate Brown"
0x42F44EFF -> "Lime Green"
0x137A8EFF -> "Teal"
HumanizeColor(color, dest[], maxLength = sizeof dest)
Ordinals
0 -> 0th
1 -> 1st
2 -> 2nd
3 -> 3rd
4 -> 4th
etc...
HumanizeOrdinal(number, dest[], maxLength = sizeof dest)
This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing