|
|
|
|
|
ReverseString - Reversing a String
|
Total Hit (1626) |
«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 (2311) |
«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
|
|
|
|
|
|
StripControlChars - Delete control characters in a string
|
Total Hit (4279) |
«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
|
|
|
String operation in vb.net
|
Total Hit (1895) |
The following example uses some of the methods discussed in the Basic String Operations topics to construct a class that performs string manipulations in a manner that might be found in a real-world application. The MailToData class stores the name and address of an individual in separate properties
....Read More |
Rating
|
|
|
|
Case insensitive replace in .net
|
Total Hit (12040) |
Sounds easy right.... but sometimes it can take your entire day how to do that using String Replace method. By default .Net string operations are case sensetive. In order to do case insensitive you need to use Strings.Replace method this is another replace method provided for VB programmers.
«co
....Read More |
Rating
|
|