Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

String::Mask provides a kind-of String Algebra

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 demo
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 var
Octocat-spinner-32 work
Octocat-spinner-32 .gemspec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .index
Octocat-spinner-32 .ruby
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 .yardopts
Octocat-spinner-32 Assembly
Octocat-spinner-32 DEMO.rdoc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 HISTORY.rdoc
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 NOTICE.rdoc
Octocat-spinner-32 README.rdoc
README.rdoc

String::Mask

Homepage | Source Code

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 © 2009 Thomas Sawyer, Rubyworks

This program is ditributed unser the terms of the FreeBSD license.

See the NOTICE.rdoc file for details.

Something went wrong with that request. Please try again.