GithubHelp home page GithubHelp logo

isabella232 / quiver_strings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/quiver_strings

0.0 0.0 0.0 565 KB

Utilities for working with strings

License: Apache License 2.0

Dart 94.39% Shell 5.61%

quiver_strings's Introduction

DEPRECATED

See https://pub.dev/packages/quiver instead!

Quiver strings

A set of string utilities for Dart.

Build Status Coverage Status

Documentation

API Docs

isBlank checks if a string is null, empty or made of whitespace characters.

isEmpty checks if a string is null or empty.

isNotEmpty checks if a string is not null and not empty.

equalsIgnoreCase checks if two strings are equal, ignoring case.

compareIgnoreCase compares two strings, ignoring case.

reverse reverses the order of characters in a string.

nullToEmpty turns null to empty string, and returns non-empty strings unchanged.

emptyToNull turns empty string to null, and returns non-empty strings unchanged.

loop allows you to loop through characters in a string starting and ending at arbitrary indices. Out of bounds indices allow you to wrap around the string, supporting a number of use-cases, including:

  • Rotating: loop('lohel', -3, 2) => 'hello'
  • Repeating, like repeat, but with better character-level control, e.g.: loop('la ', 0, 8) => 'la la la' // no tailing space
  • Tailing: loop('/path/to/some/file.txt', -3) => 'txt'
  • Reversing: loop('top', 3, 0) => 'pot'

quiver_strings's People

Contributors

a14n avatar adambender avatar azenla avatar blackhc avatar cbracken avatar codelogic avatar danielwhiteuk avatar davidmorgan avatar fniemann avatar fox32 avatar jacob314 avatar jtmcdole avatar justinfagnani avatar kevmoo avatar matanlurey avatar rkj avatar saxenasaurabh avatar seaneagan avatar sethladd avatar sigmundch avatar sunglim avatar tonio-ramirez avatar vicb avatar yjbanov avatar zoechigist 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.