Method:
|
AddABackSlash(strFolderPath)
|
Paramters:
|
1: strFolderPath (String) - The value to add a closing backslash to
|
Return Value:
|
String
|
Description:
|
Adds a trailing backslash to strFolderPath if not already present.
Programming Note: Calling AddABackSlash("C:\HL7Data") would return "C:\HL7Data\". Calling AddABackSlash("C:\HL7\") would return "C:\HL7\".
|
Method:
|
AddStringToFile(strFileName, StringToWrite)
|
Paramters:
|
1: strFileName (String) - The full path \ filename
2: StringToWrite (String) - The string content you wish to append to the file
|
Return Value:
|
Boolean - Success or Failure
|
Description:
|
Writes StringToWrite to file strFileName. The value will be appended to the end of strFileName which will be created if it does not exist.
|
Method:
|
AlphaFormat(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to scrub
2: AdditionalCharacters (String) - String value containing other characters you wish to remain in StringToCheck
|
Return Value:
|
String - StringToCheck scrubbed of unwanted characters
|
Description:
|
Scrubs StringToCheck and removes any non-alpha characters (A-Z and a-z). Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The scrub is not case-sensitive so AlphaFormat("ABC") returns "ABC" and AlphaFormat("AbC") returns "AbC"
|
Method:
|
AlphaNumericFormat(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to scrub
2: AdditionalCharacters (String) - String value containing other characters you wish to remain in StringToCheck
|
Return Value:
|
String - StringToCheck scrubbed of unwanted characters
|
Description:
|
Scrubs StringToCheck and removes any non-alphanumeric characters (A-Z and a-z and 0-9). Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The scrub is not case-sensitive so AlphaNumericFormat("ABC12.3") returns "ABC123" and AlphaNumericFormat("AbC12.3?", ".") returns "AbC12.3"
|
Method:
|
BlockAndWaitFor(intMilliseconds)
|
Paramters:
|
1: intMilliseconds (Integer) - How long to block the thread
|
Return Value:
|
None
|
Description:
|
Performs a hard thread-block of the currently executing thread for intMilliseconds.
|
Method:
|
CountFilesInFolder(strFolderPath, strFileExtension)
|
Paramters:
|
1: strFolderPath (String) - The folder path to check
2: strFileExtension (String) - The file extension to look for (leave blank "" to count all files)
|
Return Value:
|
Long - the number of files which match
|
Description:
|
Counts the number of files with strFileExtension which exist in strFolderPath.
Programming Note: Don't use wildcard characters. CountFilesInFolder("C:\HL7", "txt") = good CountFilesInFolder("C:\HL7", "*.txt") = BAD.
|
Method:
|
CountLinesInTextFile(strFileName)
|
Paramters:
|
1: strFileName (String) - The ascii text file to check
|
Return Value:
|
Integer - the number of lines in the file
|
Description:
|
Counts the number of lines in an ASCII text file named strFileName.
|
Method:
|
CountTokensInString(StringToCheck, TokenToLookFor, ....) + 2 overloads
|
Paramters:
|
1. StringToCheck (String) the string to evaluate.
2. TokenToLookFor (String) the token string to count.
|
Return Value:
|
Integer - the number of times TokenToLookFor exists in StringToCheck.
|
Description:
|
Counts the number of times TokenToLookFor occurs in StringToCheck.
|
Method:
|
DecodeBase64(strText)
|
Paramters:
|
1. strText (String) a Base64 encoded string
|
Return Value:
|
String - the decoded value of strText
|
Description:
|
Decodes a Base64 encoded value into a regular string. See EncodeBase64() below
|
Method:
|
DeskTopPath()
|
Paramters:
|
None
|
Return Value:
|
String - the Desktop folder
|
Description:
|
Returns the current Desktop folder with a trailing backslash.
Programming Note: This method obviously will not work in all scenarios depending on the type of application you are creating (a Windows Service for instance)
|
Method:
|
EncodeBase64(strText)
|
Paramters:
|
1. strText (String) a string to encode as Base64
|
Return Value:
|
String - the encoded value of strText
|
Description:
|
Encodes strText as Base64
|
Method:
|
ExceptionXML(oException)
|
Paramters:
|
1. oException (HL7PlusException) a string to encode as Base64
|
Return Value:
|
XMLPlus
|
Description:
|
An XML representation of a HL7PlusException object.
|
Method:
|
GetMyTCPIPV4Addresses()
|
Paramters:
|
None
|
Return Value:
|
List (of String)
|
Description:
|
Returns a list of IP addresses for the computer
|
Method:
|
GetTokenPositionsInString(StringToCheck, TokenToLookFor, ....) + 2 overloads
|
Paramters:
|
1. StringToCheck (String) the string to evaluate.
2. TokenToLookFor (String) the token string to count.
...Others
|
Return Value:
|
List (of Integer)
|
Description:
|
Returns a list of the positions where TokenToLookFor exists in StringToCheck.
|
Method:
|
IsAlpha(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to scrub
2: AdditionalCharacters (String) - String value containing other characters you wish to allow in StringToCheck
|
Return Value:
|
Boolean
|
Description:
|
Evaluates StringToCheck and determines if it contains any non-alpha characters (A-Z and a-z). Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The evaluation is not case-sensitive so IsAlpha("ABC") returns True and IsAlpha("AbC") returns True
|
Method:
|
IsAlphaNumeric(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to scrub
2: AdditionalCharacters (String) - String value containing other characters you wish to allow in StringToCheck
|
Return Value:
|
Boolean
|
Description:
|
Evaluates StringToCheck and determines if it contains any non-alphanumeric characters (A-Z and a-z and 0-9). Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The evaluation is not case-sensitive so IsAlphaNumeric("ABC123") returns True and IsAlphaNumeric("AbC123") returns True
|
Method:
|
IsNumerals(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to evaluate
2: AdditionalCharacters (String) - String value containing other characters you wish to allow in StringToCheck
|
Return Value:
|
Boolean
|
Description:
|
Evaluates StringToCheck and determines if it contains any non-numeric characters (0-9). Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The evaluation is not case-sensitive so IsNumeric("12.3") returns False and IsAlphaNumeric("123") returns True and IsNumeric("12.3", ".") returns True.
|
Method:
|
NumberFormat(StringToCheck, OPTIONAL AdditionalCharacters = "")
|
Paramters:
|
1: StringToCheck (String) - The value you wish to scrub
2: AdditionalCharacters (String) - String value containing other characters you wish to allow in StringToCheck
|
Return Value:
|
String
|
Description:
|
Scrubs StringToCheck and removes any non-numeric characters (0-9) in the return value. Expand the scope by passing more allowable characters in AdditionalCharacters.
Programming Note: The scrub does NOT evaluate whether the return value is a VALID number. Example NumberFormat("1A3.1..1", ".") returns "13.1..1"
|
Method:
|
OpenAnyFileOrURL(strProgramURL, OPTIONAL strArguments = "")
|
Paramters:
|
1: strProgramURL (String) - The web URL, program filename, document filename you wish to open
2: strArguments (String) - Any arguments which need to be passed
|
Return Value:
|
Boolean
|
Description:
|
Attempts to open strProgramURL with the default context. Example OpenAnyFileOrURL("C:\test.txt") would open the file test.txt in your default text editor.
Programming Note: The returned Boolean only indicates if a system error occurred. If there is no default application for your file (or URL) then the return will be TRUE and nothing will happen. Example: OpenAnyFileOrURL("mailto:support@hermetechnz.com") will do NOTHING and return TRUE if there is no email client on your computer (like Outlook, etc).
|
Method:
|
OpenComputerManager()
|
Paramters:
|
None
|
Return Value:
|
Boolean
|
Description:
|
Attempts to open the Computer Management snap-in.
|
Method:
|
OpenWindowsServices()
|
Paramters:
|
None
|
Return Value:
|
Boolean
|
Description:
|
Attempts to open the MS Windows Services snap-in.
|
Method:
|
RandomInteger(intMinimumValue, intMaximumValue)
|
Paramters:
|
1: intMinimumValue (Integer)
2: intMaximumValue (Integer)
|
Return Value:
|
Integer
|
Description:
|
Returns a random integer value between intMinimumValue and intMaximumValue inclusive.
|
Method:
|
ReadBinaryFile(strFileName)
|
Paramters:
|
1: strFileName (String) - the full path \ filename
|
Return Value:
|
Byte() - Byte array
|
Description:
|
Reads strFileName into a Byte() array.
|
Method:
|
ReadTextFile(strFileName)
|
Paramters:
|
1: strFileName (String) - the full path \ filename
|
Return Value:
|
String
|
Description:
|
Reads strFileName into a String
|
Method:
|
StringIsFileTitleSafe(strFileTitle)
|
Paramters:
|
1: strFileTitle (String) - the candidate file title string
|
Return Value:
|
Boolean
|
Description:
|
Evaluates a strFileTitle and determines whether it can be used as the Name portion of a Windows file.
|
Method:
|
ValidEmailAddress(strEmailAddress)
|
Paramters:
|
1: strEmailAddress (String) - the candidate email address string
|
Return Value:
|
Boolean
|
Description:
|
Evaluates strEmailAddress and determines whether it meets the basic format criteria for an email address
|
Method:
|
ValidPortNumber(IntPortNumber)
|
Paramters:
|
1: intPortNumber (Int32) - the candidate port number
|
Return Value:
|
Boolean
|
Description:
|
Evaluates intPortNumber and determines whether it falls within the range of valid TCP/IP Port numbers
|
Method:
|
ValidTCPIPAddress(strTCPIPAddress)
|
Paramters:
|
1: strTCPIPAddress (String) - the candidate tcp/ip address string
|
Return Value:
|
Boolean
|
Description:
|
Evaluates strTCPIPAddress and determines whether it meets the basic format criteria for a TCP/IP (V4) address
|
Method:
|
ValidWebURL(strWebURL)
|
Paramters:
|
1: strWebURL (String) - the candidate web URL string
|
Return Value:
|
Boolean
|
Description:
|
Evaluates strWebURL and determines whether it meets the basic format criteria for a web URL
|
Method:
|
WriteStringToFile(strFileName, strBuffer, OPTIONAL blnAppendIt = False)
|
Paramters:
|
1: strFileName (String) - the full path \ filename. File will be created if it does not exist
2: strBuffer (String) - the String value to write to the file
3: OPTIONAL blnAppendIt (Boolean) - If True strBuffer will be appended to the end of strFileName, if False the file will be overwritten.
|
Return Value:
|
Boolean - Success or Failure
|
Description:
|
Writes strBuffer into strFileName
|
|