Counter strings generator written in rust to help aid software testing
"A counterstring is a graduated string of arbitrary length. No matter where you are in the string, you always know the character position. This comes in handy when you are pasting huge strings into fields and they get truncated at a certain point" - James Bach
"Each asterisk in the string occurs at a position specified by the immediately preceding number. Thus, the asterisk following the 29 is the 29th character in that string. So, you can chop the end of the string anywhere, and you know exactly where it was cut. Without having to count, you know that the string
2*4*6*8*11*14*17*2
has exactly 18 characters in it. This saves some effort when you’re dealing with a half million characters. I pasted a 4000 character counterstring into the address field and it was truncated at2045*20
, meaning that 2047 characters were pasted." - James Bach
docker pull thomaschaplin/rust-counter-strings
docker run --rm thomaschaplin/rust-counter-strings <NUMBER>
Make sure you have rust installed on your machine by following the getting started guide
- Clone this repository
git clone git@github.com:thomaschaplin/rust-counter-strings.git
- Change directory
cd rust-counter-strings
- Build the application
cargo build
- Run the application
cargo run <NUMBER>
- Build the application in release mode
cargo build --release
- Execute the
rust-counter-strings
binary file found intarget/release/rust-counter-strings
./rust-counter-strings 50
2*4*6*8*11*14*17*20*23*26*29*32*35*38*41*44*47*50*
Build
docker build --rm -f Dockerfile -t thomaschaplin/rust-counter-strings .
Run
docker run --rm thomaschaplin/rust-counter-strings <NUMBER>
Rope graphic by Alpenx Nbr from ClipArtKey.