https://github.com/onelivesleft/jai-c-format
https://github.com/onelivesleft/jai-c-format
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/onelivesleft/jai-c-format
- Owner: onelivesleft
- License: other
- Created: 2021-05-25T14:22:54.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T22:18:42.000Z (over 3 years ago)
- Last Synced: 2025-03-23T16:44:28.049Z (about 1 year ago)
- Size: 354 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jai-c-format
This is an implementation of ideas proposed by @RLuba during the beta-tester Q&A stream. It includes a native jai implementation of stbsprintf, so there are no binary dependencies. To use copy the two module folders into your jai modules path, then use the `f` function to format a string using standard sprintf code:
```jai
#import "C_Format";
main :: () {
print(f("First letter is: %c\n", 65));
print(f("A number is: %07.4f\n", 17.0 / 13.0));
}
```