crypto-brainfuck

Crates.iocrypto-brainfuck
lib.rscrypto-brainfuck
version0.2.0
sourcesrc
created_at2020-10-11 12:39:04.12582
updated_at2020-10-12 06:38:41.044775
descriptionEncoding strings to brainfuck
homepage
repositoryhttps://github.com/GalAster/crypto-moe
max_upload_size
id298333
size49,199
SasakiSaki (oovm)

documentation

README

Brainfuckā„¢ Encoding

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

Commit count: 25

cargo fmt