Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

StripControlChars - Delete control characters in a string
Total Hit (4412) «Code LangId=2» ' Strip all control characters (ASCII code < 32) ' ' If the second argument is True or omitted, ' CR-LF pairs are preserved Function StripControlChars(ByVal source As String, Optional ByVal KeepCRLF As _ Boolean = True) As String ' we use this to build the result ....Read More
Rating
BusinessDateAdd - Add or subtract a number of business days from a date
Total Hit (2918) «Code LangId=1» ' add or subtract a number of business days from a date ' ' Note that it doesn't take Christmas, Easter and ' other holidays into account Function BusinessDateAdd(ByVal days As Long, ByVal StartDate As Date, _ Optional ByVal SaturdayIsHoliday As Boolean = True) As Date ....Read More
Rating
Concatenate an array of strings with commas and a final "and", or other separators
Total Hit (1609) «Code LangId=1»' Concatenate an array of strings with commas and a final "and", ' or other separators ' ' Example: ' Debug.WriteLine("Choose one from " & CreateStringList(New String() {"item1", ' "item2", "item3"})) ' ' => Choose one from item1, item2 and item3 Function CreateStringL ....Read More
Rating
Concatenate an array of strings with commas and a final "and", or other separators
Total Hit (2753) «Code LangId=2»' Concatenate an array of strings with commas and a final "and", ' or other separators ' ' Example: ' Debug.WriteLine("Choose one from " & CreateStringList(New String() {"item1", ' "item2", "item3"})) ' ' => Choose one from item1, item2 and item3 Function CreateStringL ....Read More
Rating
ConcatenateStrings - Concatenating an array of strings
Total Hit (2799) «Code LangId=2»' Concatenate the input strings, and return the resulting string. The first ' input string is used as a separator. ' ' Example: ' Dim i As Integer = 4 ' Dim d As Double = 34.45 ' Dim s As String = "VB-2-The-Max" ' Dim ret As String = ConcatenateStrings(" ", s, "is a n ....Read More
Rating
CountOccurrences - Counting the number of string occurrences
Total Hit (2926) «Code LangId=2» ' Count the number of string occurrences Public Function CountOccurrences(ByVal source As String, ByVal search As String, _ Optional ByVal ignoreCase As Boolean = False) As Integer Dim options As System.Text.RegularExpressions.RegexOptions ' set the search options a ....Read More
Rating
DecodeBase64 - Decoding a string from base64
Total Hit (2961) «Code LangId=2»' Returns the input string decoded from base64 Private Function DecodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Convert.FromBase64String(input) Return System.Text.Encoding.UTF8.GetString(strBytes) End Function «/Code» ....Read More
Rating
EncodeBase64 - Encoding a string to base64
Total Hit (3193) «Code LangId=2»' Returns the input string encoded to base64 Private Function EncodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Text.Encoding.UTF8.GetBytes(input) Return System.Convert.ToBase64String(strBytes) End Function «/Code» ....Read More
Rating
EndsWith - Check whether a string ends with one of multiple possible choices
Total Hit (2773) «Code LangId=2»' Check whether a string ends with one of multiple possible choices. ' Return -1 if no possible string matches the end of the source, ' otherwise return the index of the matching string. ' ' Examples: ' Debug.WriteLine(EndsWith("This is my test line", True, "Line", ' "Stri ....Read More
Rating
ExplodeString - Add a filling char between a string's chars
Total Hit (2592) «Code LangId=2» ' "Explode" a string by inserting a given filling character ' between consecutive characters in the original string ' ' The source string cannot contain Chr$(0) characters Function ExplodeString(ByVal Source As String, Optional ByVal fillChar As Char = _ " "c) As String ....Read More
Rating
FlipCase - Inverting the case of all characters of the input string
Total Hit (2667) «Code LangId=2» ' Invert the case of all characters of the input string ' ' Examples: ' Debug.WriteLine(FlipCase("Hello World")) ' => hELLO wORLD ' Debug.WriteLine(FlipCase("hELLO wORLD")) ' => Hello World ' Debug.WriteLine(FlipCase("3) this is message n. 3")) ' => 3) THIS IS ' MES ....Read More
Rating
FormatMemorySize - Format a value in bytes
Total Hit (2844) «Code LangId=2» Enum FormatMemorySizeUnits BestGuess Bytes Kilobytes Megabytes Gigabytes End Enum ' convert a number of bytes into Kbytes, Megabytes, or Gigabytes Function FormatMemorySize(ByVal value As Long, _ ByVal unit As FormatMemorySizeUnits, Optional B ....Read More
Rating
FormatSize - Format a size expressed in bytes
Total Hit (2552) «Code LangId=2» ' Returns a formatted string that shows the size in Bytes, KBytes or MBytes ' according to the size ' Usage: ' Dim ProperSizeString As String = FormatSize("132100842") ' -> returns "125.98 MB" Function FormatSize(ByVal SizeInBytes As Double) As String If SizeInBytes ....Read More
Rating
FormatValue - Format a value in a column of given width
Total Hit (2829) «Code LangId=2» Enum FormatColumnAlignment Left Center Right End Enum ' format a value in a column of given width and with specified alignment ' using the specified pad character Function FormatValue(ByVal value As String, ByVal width As Integer, _ ByVal alignment As F ....Read More
Rating
GetDelimitedText - Extract the text between open and close delimiters
Total Hit (2850) «Code LangId=2»' get the text enclosed between two Delimiters ' ' it advances Index after the close delimiter ' Returns "" and Index = -1 if not found ' search is case sensitive ' ' For example: ' Dim source As String = " a sentence with (a word) in parenthesis" ' Dim i As Integer = 0 ....Read More
Rating
GetUrlParameters - Retrieving the key-value pairs from the specified url
Total Hit (2656) «Code LangId=2» ' Returns a hashtable with the key-value pairs extracted from the querystring ' of the specified url ' EXAMPLE: ' Dim ht As Hashtable = GetUrlParameters ' ("http://www.mysite.com?param1=123&param2=&param3=234") ' ' print the key=value pairs to the console window ' Di ....Read More
Rating
GetWordOccurrences - Number of occurrences of each word in a string
Total Hit (2612) «Code LangId=2» ' Returns a Hashtable whose keys are the unique words in a source string ' and whose elements are the number of occurrences of each word ' ' Example: ' ' Dim de As DictionaryEntry ' For Each de In GetWordOccurrences(sourceText) ' Console.WriteLine("'{0}' = {1} time(s), ....Read More
Rating
IncrementString- Incrementing the numeric right-most portion of a string
Total Hit (2918) «Code LangId=2» ' Increment the numeric right-most portion of a string ' Example: MessageBox.Show(IncrementString("test219")) ' => 220 Function IncrementString(ByVal text As String) As String Dim index As Integer Dim i As Integer For i = text.Length - 1 To 0 Step -1 Sel ....Read More
Rating
InstrTbl - Search a string for any character in a table
Total Hit (3663) «Code LangId=2» ' If INCLUDE is True or is omitted, return the first occurrence of a character ' in a group ' or -1 if SOURCE doesn't contain any character among those listed in TABLE. ' If INCLUDE is False, return the first occurrence of the character in SOURCE ' that does not appear in TABL ....Read More
Rating
InstrTblRev - The last occurrence of a char in a table
Total Hit (3456) «Code LangId=2»' If INCLUDE is True or is omitted, return the last occurrence of a character ' in a group ' or -1 if SOURCE doesn't contain any character among those listed in TABLE. ' If INCLUDE is False, return the last occurrence of the character in SOURCE ' that does not appear in TABLE. ....Read More
Rating
IsStringLower - Determine whether a string contains only lowercase characters
Total Hit (2707) «Code LangId=2» ' Returns True if a string contains only lowercase characters Function IsStringLower(ByVal sText As String) As Boolean Dim c As Char For Each c In sText If Not Char.IsLower(c) Then Return False Next Return True End Function «/Code» ....Read More
Rating
IsStringUpper - Determine whether a string contains only uppercase characters
Total Hit (1719) «Code LangId=2»' Returns True if a string contains only uppercase characters Function IsStringUpper(ByVal sText As String) As Boolean Dim c As Char For Each c In sText If Not Char.IsUpper(c) Then Return False Next Return True End Function «/Code» ....Read More
Rating
PluralToSingular - Converting the input word from plural to singular
Total Hit (2350) «Code LangId=2»' Convert the input word from plural to singular Function PluralToSingular(ByVal plural As String) As String ' convert to lowercase for easier comparison Dim lower As String = plural.ToLower() Dim res As String ' rule out a few exceptions If lower = "feet" ....Read More
Rating
ReplaceAccentedChars - Replacing all accented characters in the input string
Total Hit (2662) «Code LangId=2» ' Replace all accented characters in the input string ' Note: this function was written according to Italian rules. Rules for your ' language may vary, for example È may not be converted to "E'" as it is in ' Italian ' ' Example: ' Debug.WriteLine(ReplaceAccentedChars("È ....Read More
Rating
ReplicateString - Replicate a string a given number of times
Total Hit (2595) «Code LangId=2»' Replicate a string a given number of times Function ReplicateString(ByVal Source As String, ByVal Times As Integer) As _ String Dim i As Integer Dim sb As New Text.StringBuilder(Source.Length * Times) For i = 1 To Times sb.Append(Source) Next ....Read More
Rating
ReverseString - Reversing a String
Total Hit (1679) «Code LangId=2» ' Reverse the input string, without using the StrRever function in the VB6 ' compatibility assembly Function ReverseString(ByVal source As String) As String Dim chars() As Char = source.ToCharArray() Array.Reverse(chars) Return New String(chars) End Function « ....Read More
Rating
SearchString - Searching a string in case [in]sensitive mode
Total Hit (2359) «Code LangId=2» ' Search the specified string, with the case-sensitive mode or not ' Returns the index of the first occurrence found, or -1 if not found Public Function SearchString(ByVal source As String, ByVal search As String, _ Optional ByVal ignoreCase As Boolean = False) As Integer ....Read More
Rating
SingularToPlural - Converting the input word from singular to plural
Total Hit (2537) «Code LangId=2»' Convert the input word from singular to plural Function SingularToPlural(ByVal singular As String) As String ' convert to lowercase for easier comparison Dim lower As String = singular.ToLower() Dim res As String ' rule out a few exceptions If lower = "f ....Read More
Rating
SplitQuoted - A split variant that deals correctly with quoted elements
Total Hit (1966) «Code LangId=2»' split a string, dealing correctly with quoted items ' ' TEXT is the string to be split ' SEPARATOR is the separator char (default is comma) ' QUOTES is the character used to quote strings (default is """", ' the double quote) ' you can also use a character pair (eg "{}") ....Read More
Rating
StartsWith - Check whether a string starts with one of multiple possible choices
Total Hit (1841) «Code LangId=2»' Check whether a string starts with one of multiple possible choices. ' Return -1 if no possible string matches the start of the source, ' otherwise return the index of the matching string. ' ' Examples: ' Debug.WriteLine(StartsWith("This is my test line", True, "this", ' ....Read More
Rating


(Page 106 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.