https://github.com/rubyworks/strmask
String::Mask provides a kind-of String Algebra
https://github.com/rubyworks/strmask
Last synced: 11 months ago
JSON representation
String::Mask provides a kind-of String Algebra
- Host: GitHub
- URL: https://github.com/rubyworks/strmask
- Owner: rubyworks
- Created: 2010-02-23T22:28:56.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2012-11-30T17:14:44.000Z (about 13 years ago)
- Last Synced: 2025-03-08T05:18:54.803Z (12 months ago)
- Language: Ruby
- Homepage: http://rubyworks.github.com/strmask
- Size: 332 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rdoc
- Changelog: HISTORY.rdoc
Awesome Lists containing this project
README
= String::Mask
{Homepage}[http://rubyworks.github.com/strmask] |
{Source Code}[http://github.com/rubyworks/strmask]
{
}[http://travis-ci.org/rubyworks/strmask]
== DESCRIPTION
Mask provides a string utility to manipulate strings
in logicomathematical manner, ie. add, subtract, xor,
etc.
== SYNOPSIS
Mask objects can be created explicitly via #new.
m1 = String::Mask.new("abc..123", '.')
m2 = String::Mask.new("ab..789.", '.')
m1 - m2 #=> "....789."
But the String#mask extension is much easier to use.
m1 = "abc..123".mask('.')
m2 = "ab..789.".mask('.')
m1 * m2 #=> "ab..789."
The second operand can be a normal String. Mask will assume
it repesents another mask akin to the first.
"abc..123".mask('.') + "ab..789." #=> "abc.7893"
== INSTALL
To install with RubyGems simply open a console and type:
$ gem install strmask
== COPYRIGHTS
Copyright (c) 2009 Thomas Sawyer, Rubyworks
This program is ditributed unser the terms of the *FreeBSD* license.
See the NOTICE.rdoc file for details.