forked from oxeanbits/equations-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create mask(string, integer) function (oxeanbits#26)
* Create the `mask()` function, which applies a **mask** into a **number**. # Syntax ```rb mask(string, integer) ``` # Examples ```rb parsec> mask("000-000", 14) Result (type: 's'): ans = "000-014" parsec> mask("000-000", 992992) Result (type: 's'): ans = "992-992" parsec> mask("000-000", 992992992) Result (type: 's'): ans = "992992-992" parsec> mask("000-000", 0) Result (type: 's'): ans = "000-000" parsec> mask("000-000", 1.4) Can't evaluate function/operator "mask": Value "1.4" is of type 'f'. There is no implicit conversion to type 'i'. (Errc: 44) parsec> mask("00 00", 123) Result (type: 's'): ans = "01 23" parsec> concat("#", mask("000-000", 1234)) Result (type: 's'): ans = "oxeanbits#1-234" ```
- Loading branch information
1 parent
5870890
commit ded1a0c
Showing
4 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters