Giter VIP home page Giter VIP logo

data-maskprint's Introduction

Perl module Data::MaskPrint
------------------------------
Copyright (c) 2001 Ilya Verlinsky ([email protected])

This module is designed to easily print data in the predictable format,
specified by the mask applied

This module is Pure Perl so no compiler is needed
to install do:

make
make test
make install


See supporting documentation for API

The following are the examples of strings that could be generated with
this module (b represents space generated by the formatter):

Format String       Data Value          Formatted Result    

'#####'             0                   bbbb0               
'&&&&&'             0                   00000               
'$$$$$'             0                   bbb$0               
'*****'             0                   ****0               
'##,###'            12345               12,345              
'##,###'            1234                b1,234              
'##,###'            123                 bbb123              
'##,###'            12                  bbbb12              
'##,###'            1                   bbbbb1              
'##,###'            -1                  bbbb-1              
'##,###'            0                   bbbbb0              
'&&,&&&'            12345               12,345              
'&&,&&&'            1234                01,234              
'&&,&&&'            123                 000123              
'&&,&&&'            12                  000012              
'&&,&&&'            1                   000001              
'&&,&&&'            0                   000000              
'$$,$$$'            12345               ******              
                                        (overflow)

'$$,$$$'            1234                $1,234              
'$$,$$$'            123                 bb$123              
'$$,$$$'            12                  bbb$12              
'$$,$$$'            1                   bbbb$1              
'$$,$$$'            0                   bbbb$0              
'**,***'            12345               12,345              
'**,***'            1234                *1,234              
'**,***'            123                 ***123              
'**,***'            12                  ****12              
'**,***'            1                   *****1              
'**,***'            0                   *****0              
'##,###.##'         12345.67            12,345.67           
'##,###.##'         1234.56             b1,234.56           
'##,###.##'         123.45              bbb123.45           
'##,###.##'         12.34               bbbb12.34           
'##,###.##'         1.23                bbbbb1.23           
'##,###.##'         0.12                bbbbb0.12           
'##,###.##'         0.01                bbbbb0.01           
'##,###.##'         -0.01               bbbb-0.01           
'##,###.##'         -1                  bbbb-1.00           
'&&,&&&.&&'         12345.67            12,345.67           
'&&,&&&.&&'         1234.56             01,234.56           
'&&,&&&.&&'         123.45              000123.45           
'&&,&&&.&&'         0.01                000000.01           
'$$,$$$.$$'         12345.67            *********           
                                        (overflow)

'$$,$$$.$$'         1234.56             $1,234.56           
'$$,$$$.##'         0                   bbbb$0.00           
'$$,$$$.##'         1234                $1,234.00           
'$$,$$$.&&'         0                   bbbb$0.00           
'$$,$$$.&&'         1234                $1,234.00           
'-##,###.##'        -12345.67           -12,345.67          
'-##,###.##'        -123.45             -bbb123.45          
'-##,###.##'        -12.34              -bbbb12.34          
'--#,###.##'        -12.34              b-bbb12.34          
'---,###.##'        -12.34              bbb-b12.34          
'---,-##.##'        -12.34              bbbb-12.34          
'---,--#.##'        -1                  bbbbb-1.00          
'-##,###.##'        12345.67            b12,345.67          
'-##,###.##'        1234.56             bb1,234.56          
'-##,###.##'        123.45              bbbb123.45          
'-##,###.##'        12.34               bbbbb12.34          
'--#,###.##'        12.34               bbbbb12.34          
'---,###.##'        12.34               bbbbb12.34          
'---,-##.##'        12.34               bbbbb12.34          
'---,---.##'        1                   bbbbbb1.00          
'---,---.--'        -0.01               bbbbb-0.01          
'---,---.&&'        -0.01               bbbbb-0.01          
'-$$,$$$.&&'        -12345.67           **********          
                                        (overflow)

'-$$,$$$.&&'        -1234.56            -$1,234.56          
'-$$,$$$.&&'        -123.45             bb-$123.45          
'--$,$$$.&&'        -12345.67           **********          

                                        (overflow)
'--$,$$$.&&'        -1234.56            -$1,234.56          
'--$,$$$.&&'        -123.45             bb-$123.45          
'--$,$$$.&&'        -12.34              bbb-$12.34          
'--$,$$$.&&'        -1.23               bbbb-$1.23          
'----,--$.&&'       -12345.67           -$12,345.67         
'----,--$.&&'       -1234.56            b-$1,234.56         
'----,--$.&&'       -123.45             bbb-$123.45         
'----,--$.&&'       -12.34              bbbb-$12.34         
'----,--$.&&'       -1.23               bbbbb-$1.23         
'----,--$.&&'       -0.12               bbbbb-$0.12         
'$***,***.&&'       12345.67            $*12,345.67         
'$***,***.&&'       1234.56             $**1,234.56         
'$***,***.&&'       123.45              $****123.45         
'$***,***.&&'       12.34               $*****12.34         
'$***,***.&&'       1.23                $******1.23         
'$***,***.&&'       0.12                $******0.12         
'($$$,$$$.&&)'      -12345.67           ($12,345.67)        
'($$$,$$$.&&)'      -1234.56            (b$1,234.56)        
'($$$,$$$.&&)'      -123.45             (bbb$123.45)        
'(($$,$$$.&&)'      -12345.67           ($12,345.67)        
'(($$,$$$.&&)'      -1234.56            ($1,234.56)         
'(($$,$$$.&&)'      -123.45             (bb$123.45)         
'(($$,$$$.&&)'      -12.34              (bbb$12.34)         
'(($$,$$$.&&)'      -1.23               (bbbb$1.23)         
'((((,(($.&&)'      -12345.67           ($12,345.67)        
'((((,(($.&&)'      -1234.56            ($1,234.56)         
'((((,(($.&&)'      -123.45             (b$123.45)          
'((((,(($.&&)'      -12.34              ($12.34)            
'((((,(($.&&)'      -1.23               ($1.23)             
'((((,(($.&&)'      -0.12               ($0.12)             
'($$$,$$$.&&)'      12345.67            $12,345.67          
'($$$,$$$.&&)'      1234.56             $1,234.56           
'($$$,$$$.&&)'      123.45              $123.45             
'(($$,$$$.&&)'      12345.67            $12,345.67          
'(($$,$$$.&&)'      1234.56             $1,234.56           
'(($$,$$$.&&)'      123.45              $123.45             
'(($$,$$$.&&)'      12.34               $12.34              
'(($$,$$$.&&)'      1.23                $1.23               
'((((,(($.&&)'      12345.67            $12,345.67          
'((((,(($.&&)'      1234.56             $1,234.56           
'((((,(($.&&)'      123.45              $123.45             
'((((,(($.&&)'      12.34               $12.34              
'((((,(($.&&)'      1.23                $1.23               
'((((,(($.&&)'      0.12                $0.12               
'<<<<<'             0                   0                   
'<<<,<<<'           12345               12,345              
'<<<,<<<'           1234                1,234               
'<<<,<<<'           123                 123                 
'<<<,<<<'           12                  12                  

data-maskprint's People

Watchers

 avatar  avatar  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.