Giter Club home page Giter Club logo

pluremall's Introduction

PlurEmAll

Plural forms string manipulation utility for making up countable terms

PLUR is an aggregation of ideas that were part of the earlier hippie and peace movement ("peace", "love") and black and hip hop culture ("respect"). Specific use of the term dates to the early 1990s rave scene. One of the most influential uses of the term was made by DJ Frankie Bones in June 1993.

Usage

With PlurEmAll you can easily make any countable term up to you, ready to read as a plural form.

    print("apple".plurify(with: 3)) // Prints: "3 apples"
    print("apple".plurify(with: -1)) // Prints: "an apple"
    print("apple".plurify(with: 0)) // Prints: "no apples"
    

You can also use uncountable Cardinality to denominate a multitude of term.

public enum Cardinality {
    case none
    case single
    case multiple
}

To make up a plural form with uncountable cardinality pass it to parameter like a count.

    print("apple".plurify(with: .multiple)) // Prints: "apples"
    print("apple".plurify(with: .single)) // Prints: "an apple"
    print("apple".plurify(with: .none)) // Prints: "no apples"

Easy peace, love, unity and respect for apple!

TO-DO

  • Count expressed in any number
  • Support for irregular articles
  • Interface for countable terms to distinguish them from strings

Author

Pietrus Łyczba, [email protected]

License

THE SOFTWARE IS PROVIDED "AS IS"

pluremall's People

Contributors

lyzkov avatar

Watchers

 avatar  avatar

pluremall's Issues

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.