The very first plugin for Servoy, Tools now reached it's 7th revision.
I improved the zip and unzip classes to work with folders also and I dropped the DES encryption. The encryption functions have been moved to my latest plugin Cryptor.
Have fun with it and check out my second (Splash) plugin to show a splash screen and my third (Cryptor) plugin...
The tools plugin now holds the following FIFTEEN functions:
FILES
1.zip
zip a (single) file and a folder.
2.unzip
unzip a file, a group of files and folders. REMARK: mac OS X users wonM-^Rt be able to resolve a zipped application with this unzip utility (yet). When you unzip a file or folder to a destination with a file or folder with the same name the file or folder will be numbered. The numbering will be checked also.
CALCULATION
3. getMaxDay
returns the last day of the given month.
4. getIT2Be
returns my name, email and GSM.
(STRING) FORMATTING
5. dateFormat
very much like the Java dateFormat class to convert a date to a string and the other way around with (or without) a formatting string.
6. numberFormat
formats the (localized) number to the formatString.
7. secondsFormat
to make a number of seconds a string and the other way around. formatting like HH:mm:ss.
8.Mirror
reverse a string M-^QmirrorStringM-^R into M-^QgnirtSrorrimM-^R.
VALIDATION
9. isEmail
based on a method I posted earlier on this forum now available in this plugin. It takes a string with one or more email adresses and checks if the format is correct.
10. isExpired
takes a year, month and (optional) day and returns a boolean when expired. Can be used to check the expiration date of a credit card.
11. isInteger
returns a boolean value, checks a string.
12. isInRange
takes dates, numbers/integers and strings and returns true or false.
* dates: dates need to be set with new Date() not a db timestamp
* string: there is an option to be set to true if you want to ignore cases
13. isModulus10
takes a string, filters all numbers and tells you the result of a modulus10 check. Can be used to check a credit card number.
14. isNumber
returns a boolean value after checking a string.
* localized but will return false when you input thousand seperators.
15. isTextOnly
takes a string and returns false if it finds numbers.
The result is attached. Just drop it in your plugins folder and restart Servoy.
Feel free to use it and distribute it but give me credit for it.
The plugin is free, provided M-^Qas isM-^R and I can not take any responsibility for the way it behaves or works.
And I would really like some feedback on (most) wanted functions. Maybe in the direction of validation...
Cheers