samp.directory
← Скрипты и библиотеки

Sreyas-Sreelal/pawn-humanize

A human-friendly Pawn library

Библиотека★ 2обновлён июль 2018 г.MITPAWNsampctl
Открыть на GitHub

Установка через sampctl

sampctl package install Sreyas-Sreelal/pawn-humanize

Выполните в папке проекта. sampctl скачает пакет и его зависимости.

Зависит от 1 пакета

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)

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью