Giter Club home page Giter Club logo

strglob's Introduction

strglob ๐Ÿ’ฌ

Description ๐Ÿ“„

  1. strglob is a C development library designed to enumerate characters/numbers/strings by expanding "globbing" pattern syntax
  2. Its purpose is to provide a compact specification for test case input string generation.

strglob Features ๐Ÿ“Š

strglob supports a wide variety of syntax types for both character and string generation including:

  1. ranges ๐ŸŽฒ * alphabetic ranges
    • [e-i] => e f g h i (lowercase)
    • [A-C] => A B C (uppercase) * numeric ranges
    • [0-4] => 0 1 2 3 4 (zero inclusive natural numbers)
    • [10-14] => 10 11 12 13 14 (multiple digits) * negative numeric ranges
    • [-2-2] => -2 -1 0 1 2 (real numbers and whole numbers)
    • [-4--2] => -4 -3 -2 (real numbers only) * zero-prepended numeric ranges
    • [01-03] => 01 02 03 (both limits)
    • [01-4] => 01 02 03 04 (first only)
    • [0-02] => 0 1 2 (last only) * reverse ranges
    • [c-a] => c b a (alphabetic characters)
    • [3-1] => 3 2 1 (numeric digits)
    • [-1--3] => -1 -2 -3 (negative integers)
    • [2--1] => 2 0 1 -1 (real numbers) * sequence expression ranges
    • {d..b} => d c b (reverse range of alphabetic characters)
    • {a..f..2} => a c e (alphabetic range with increment value)
    • {1..3} => 1 2 3 (numeric range)
    • {-2..2} => -2 -1 0 1 2 (negative numeric range)
    • {0..6..2} => 0 2 4 6 (numeric range with increment value)
  2. classes ๐ŸŽ * character classes
    • [:digit:] => 0 1 2 3 4 5 6 7 8 9 0 [numeric digits](
    • [:reserved:] => ! # $ & ' ( ) * + , / : ; = ? @ [ ] percent-encoding reserved characters * string classes
    • {:wdays:} => sun mon tue wed thu fri sat sun (lowercase weekdays)
    • {:Wdays:} => Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec (capital weekdays)
    • {:WDAYS:} => JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC (uppercase weekdays)
  3. sets ๐Ÿ“ * string sets
    • {a,b,c} => a b c (logical and)
  4. shell features ๐ŸŽซ * environment expansion
    • {$LOGNAME} => decal (login name variable) * file includes
    • {/etc/issue.net} => Ubuntu 16.04.4 LTS (identification file for telnet sessions)

Note that.. ๐Ÿ“

Numeric and character ranges are denoted by square brackets

Strings are signified with curly braces

Range limits are delimited by dashes which are also for signing negative integers

String sets are separated by commas

Both character and string class names are surrounded by colons

Character class identifiers are taken from the standard C library's ctype.h header file

Bash-style sequence expressions are specified with curly braces and take an optional numeric increment value

Related Documentation ๐Ÿ“š

cURL Influence โžฐ

strglob behaves similar to the lists and ranges implemented by curl on the command line:

  • curl 'https://host.dom/{foo,bar,baz}/'

    • https://foo
    • https://bar
    • https://baz
  • curl 'https://host.dom/[0-2]/'

    • https://0
    • https://1
    • https://2
  • Refer to the URL globbing section in Everything curl for more information.

strglob's People

Contributors

decal avatar

Stargazers

 avatar  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.