All Projects → oli-obk → Rust Si

oli-obk / Rust Si

Licence: other
a rusty `scanf` (`scan!`) and inverse of `print!` (`read!`)

Programming Languages

rust
11053 projects
macros
77 projects

Labels

Projects that are alternatives of or similar to Rust Si

Github nuggestsforpython3.0
Modification of Github_Nuggests based on @az0ne,Thanks! This script full support for Python3.0
Stars: ✭ 45 (-61.21%)
Mutual labels:  scan
React Native Fingerprint Identify
Awesome Fingerprint Identify for react-native (android only)
Stars: ✭ 81 (-30.17%)
Mutual labels:  scan
Swiftscan
A barcode and qr code scanner( 二维码 各种码识别,生成,界面效果)
Stars: ✭ 1,349 (+1062.93%)
Mutual labels:  scan
Mapscanner
R package to print maps, draw on them, and scan them back in
Stars: ✭ 55 (-52.59%)
Mutual labels:  scan
Jsprintmanager
Advanced Client-side Printing & Scanning Solution for Javascript
Stars: ✭ 74 (-36.21%)
Mutual labels:  scan
Iostreams
IOStreams is an incredibly powerful streaming library that makes changes to file formats, compression, encryption, or storage mechanism transparent to the application.
Stars: ✭ 84 (-27.59%)
Mutual labels:  io
Fitsio
fitsio is a pure-Go package to read and write `FITS` files
Stars: ✭ 40 (-65.52%)
Mutual labels:  io
Giojs
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js
Stars: ✭ 1,528 (+1217.24%)
Mutual labels:  io
Mraa
Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
Stars: ✭ 1,220 (+951.72%)
Mutual labels:  io
Pki Io
Main repo with docs etc.
Stars: ✭ 95 (-18.1%)
Mutual labels:  io
Backpacking
An Io web framework of sorts
Stars: ✭ 57 (-50.86%)
Mutual labels:  io
Radarview
🍳 RadarView for Android 是一个雷达扫描动画后,然后展示得分效果的控件。
Stars: ✭ 73 (-37.07%)
Mutual labels:  scan
Audio
Data manipulation and transformation for audio signal processing, powered by PyTorch
Stars: ✭ 1,262 (+987.93%)
Mutual labels:  io
Dockerscan
Docker security analysis & hacking tools
Stars: ✭ 1,046 (+801.72%)
Mutual labels:  scan
K8portscan
跨平台大型网络端口扫描器(支持批量A段/B段/C段/IP列表(TXT)/端口列表,Banner识别比S扫描器加强版更准)
Stars: ✭ 99 (-14.66%)
Mutual labels:  scan
Shapefile.jl
Parsing .shp files in Julia
Stars: ✭ 40 (-65.52%)
Mutual labels:  io
Mixed Content Scanner
Scan a HTTPS-site for mixed content
Stars: ✭ 81 (-30.17%)
Mutual labels:  scan
Nuclei
Proactive IO & Runtime system
Stars: ✭ 113 (-2.59%)
Mutual labels:  io
Io
Main repository for the Digital Citizenship initiative of the Italian Government
Stars: ✭ 105 (-9.48%)
Mutual labels:  io
Scanport
golang版高性能端口扫描工具
Stars: ✭ 90 (-22.41%)
Mutual labels:  scan

Build Status Latest Version Clippy Linting Result

You can use either the read! macro to read a single value and return it, or the scan! macro to read one or more values into variables. Both macros can also read from a file or from memory. The read! macro can take any type that implements Iterator<Item=u8> as an optional third argument, and the scan! macro's arguments can be prefixed with iter => where iter implements Iterator<Item=u8>.

Examples

scan! macro

use text_io::scan;

// reading from a string source
let i: i32;
scan!("<b>12</b>".bytes() => "<b>{}</b>", i);
assert_eq!(i, 12);

// reading multiple values from stdio
let a: i32;
let b: &mut u8 = &mut 5;
scan!("{}, {}", a, *b);

read! macro

use text_io::read;

// read until a whitespace and try to convert what was read into an i32
let i: i32 = read!();

// read until a whitespace (but not including it)
let word: String = read!(); // same as read!("{}")

// read until a newline (but not including it)
let line: String = read!("{}\n");

// expect the input "<b><i>" or panic
// read until the next "<" and return that.
// expect the input "/i></b>"
let stuff: String = read!("<b><i>{}</i></b>");

// reading from files
use std::io::Read;
let mut file = std::fs::File::open("tests/answer.txt").unwrap().bytes().map(|ch| ch.unwrap());
let val: i32 = read!("The answer is {}!!!11einself\n", file);

// reading from strings
let val: i32 = read!("Number: {}", "Number: 99".bytes());
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].