The very first plugin for Servoy now reached it’s 6th revision.
I added zip and unzip functions and a function to mirror a text.
Have fun with it and check out my second (Splash) plugin to show a splash screen…
The tools plugin now holds the following SEVENTEEN functions:
FILES
1.zip
zip a (single) file, not a folder.
2.unzip
unzip a file or a group of files, not a folder.
ENCRYPTION
-
encrypt
java DES encrypt a string with an optional user key. -
decrypt
decrypt a string previously encrypted with the above function.
CALCULATION
-
getMaxDay
returns the last day of the given month. -
getIT2Be
returns my name, email and GSM.
(STRING) FORMATTING
-
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. -
numberFormat
formats the (localized) number to the formatString. -
secondsFormat
to make a number of seconds a string and the other way around. formatting like HH:mm:ss.
4.Mirror
reverse a string M-^QmirrorStringM-^R into M-^QgnirtSrorrimM-^R.
VALIDATION
-
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. -
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. -
isInteger
returns a boolean value, checks a string. -
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
-
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. -
isNumber
returns a boolean value after checking a string.
- localized but will return false when you input thousand seperators.
- 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.
REMARK: When you missed version 4 please read the remarks about the old version.
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