I was looking on the net recently for a complete list of URL Escape codes. I found a number of websites that had partial lists, but never one that showed a full list that I could save and print out for offline use. Since I couldn't find one online I decided to make my own. This list shows all possible URL Escape Codes with the most commonly used ones at the top. For more information, you can read about URL Encoding on Wikipedia.
Here's a simple function I wrote for URL Encoding a string in Visual Basic. I also have a list of URL Escape Codes available for download as well.
Here are two different ways I've come up with for determining if a number is an integer in Visual Basic. The first way, IsInteger, is a function that will return true if you pass it a VB Integer data type. The second way, IsIntegerStr, is a function that will return true if you pass it a VB Integer data type or an integer in string form.
IsNumeric Alternative (VB Function)
Posted March 6th, 2009 by Ryan Olbe Visual Basic Projects No Comments »Here's an original idea I came up with as a replacement to the built-in VB IsNumeric function. It gives you complete control over what you consider a number to be. For example, let's say you pass the value $3,207.37 to isNumeric. Now normally this would return true, but what if you didn't want it to return true. What if you wanted it to count the comma and period as a number, but not the dollar sign (i.e. 3,207.37 is a number and $3,207.37 is not). Well normally you wouldn't be able to do anything about it, but with this function you are able to decide which individual characters you think are numeric and which characters you think are not numeric. This function allows you to pass as many characters as you want after the number specifying what you consider a number to be. For example, if you consider the comma (,) and the dollar sign ($) to be "a number", then you would say isNumeric2("333.33", ",$"). After you pass it the initial number (either in string or non-string form), you pass it all of the characters you consider to be numeric in one string, so if you consider the comma, dollar sign and percent sign to be numeric you would say: isNumeric2("$500.23%", ",$%"). And this function will return true (if the number is numeric) and false (if the number is not numeric). Feedback and comments are welcome.
Extract Only Numbers (VB Function)
Posted March 6th, 2009 by Ryan Olbe Visual Basic Modules 2 Comments »Here's a Visual Basic function I wrote called extractOnlyNumbers which returns the numeric only parts of a string. For example, extractOnlyNumbers("123a4") would return 1234 (as a double). If you decide to pass it the second parameter (stop_at_non_numeric), then it will stop processing when it reaches a non-numeric character so extractOnlyNumbers("123a4") would return 123 (as a double). This second parameter is optional, if you don't pass it then it will process all characters.

Recent Comments