| Crates.io | crypto-brainfuck |
| lib.rs | crypto-brainfuck |
| version | 0.2.0 |
| created_at | 2020-10-11 12:39:04.12582+00 |
| updated_at | 2020-10-12 06:38:41.044775+00 |
| description | Encoding strings to brainfuck |
| homepage | |
| repository | https://github.com/GalAster/crypto-moe |
| max_upload_size | |
| id | 298333 |
| size | 49,199 |
use crypto_brainfuck::encode;
#[test]
fn test() {
let out = encode("Hello, World!");
let target = "-[++[<++>->+++>+++<<]---->+]<<<<.<<<<-.<..<<+.<<<<.>>.>>>-.<.+++.>>.>-.<<<<<+.";
assert_eq!(out.replace("\n",""), target)
}
If there are 14 consecutive + or - signs, then this is a bad case of the algorithm.
See: Brainfuck constants
Some other: https://copy.sh/brainfuck/text.html