Git Product home page Git Product logo

rust-counter-strings's Introduction

logo

rust-counter-strings

Counter strings generator written in rust to help aid software testing

What is a counterstring?

"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

How do I use a counterstring?

"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 at 2045*20, meaning that 2047 characters were pasted." - James Bach

Docker Usage

  • docker pull thomaschaplin/rust-counter-strings
  • docker run --rm -it thomaschaplin/rust-counter-strings <NUMBER>

Development Setup

Make sure you have rust installed on your machine by following the getting started guide

Instructions

  • Clone this repository git clone [email protected]:thomaschaplin/rust-counter-strings.git
  • Change directory cd rust-counter-strings
  • Build the application cargo build
  • Run the application cargo run <NUMBER>

Final Build

  • Build the application in release mode cargo build --release
  • Execute the rust-counter-strings binary file found in target/release/rust-counter-strings

Example Usage:

./rust-counter-strings 50

2*4*6*8*11*14*17*20*23*26*29*32*35*38*41*44*47*50*

Local Docker Setup

Build

docker build --rm -f Dockerfile -t thomaschaplin/rust-counter-strings .

Run

docker run --rm -it thomaschaplin/rust-counter-strings <NUMBER>

Rope graphic by Alpenx Nbr from ClipArtKey.

rust-counter-strings's People

Contributors

thomaschaplin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.