Tag Archive: Function

Aug 24

Check for Upper and Lower Case Function (chkUprAndLwrCase)

This function will check a string to make sure it contains both upper and lower case characters

Continue reading »

Permanent link to this article: https://www.wperry.net/code/chkuprandlwrcase/

May 18

Truncate a String to a Specific Length Function (trunkString)

Truncates a string to a given length and adds a “…” at the end. If the string is not truncated (shorter than max) returns the same string that was sent.

Continue reading »

Permanent link to this article: https://www.wperry.net/code/trunkstring/

May 04

Check Array for String Function (isInArray)

Checks to see if a string is in an array, also allows

Continue reading »

Permanent link to this article: https://www.wperry.net/code/isinarray/

Apr 27

Popup Window Function (popWin)

A simplified popup window function

Continue reading »

Permanent link to this article: https://www.wperry.net/code/popwin/

Apr 20

File Icon Selector Function (pickIcon)

Selects an icon for displaying a file link

Continue reading »

Permanent link to this article: https://www.wperry.net/code/pickicon/

Apr 13

File Path Cleaner Function (clnFile)

Prevents travesing of a directory tree by using “..” to move above the allowed area.

Continue reading »

Permanent link to this article: https://www.wperry.net/code/clnfile/

Mar 23

Anternating Colors Function (altColor)

Each time the function is called alternates between returning the two values.
Useful for alternating colors in a table.

Continue reading »

Permanent link to this article: https://www.wperry.net/code/altcolor/

Feb 09

Safe Format Date Function (fmtDate)

Checks for valid date before performing formatdatetime function on a string/date

Continue reading »

Permanent link to this article: https://www.wperry.net/code/fmtdate/

Jan 26

Month Calendar Cenerator Function (monthCalendar)

Generates a calendar for a single month ‘thisDate’. This is the calendar in the upper left corner of this site, but without the stylesheets

Continue reading »

Permanent link to this article: https://www.wperry.net/code/monthcalendar/

Jan 19

Format Text Function (fmtText)

Converts line breaks in a string to
for html display

Continue reading »

Permanent link to this article: https://www.wperry.net/code/fmttext/

Older posts «