Last active
February 3, 2016 15:27
-
-
Save Laicure/f98f35c0ea6a5b5dcff2 to your computer and use it in GitHub Desktop.
Revisions
-
Laicure revised this gist
Feb 3, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Module StringManipulate #End Region #Region "ListBox Items to Array String" Friend Function ListBoxToArray(ListBoxer As ListBox) As String() Dim arr As String() = {"*"} If ListBoxer.Items.Count > 0 Then arr = New String(ListBoxer.Items.Count - 1) {} -
Laicure revised this gist
Feb 3, 2016 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,4 +26,18 @@ Module StringManipulate Return String.Join("", y.ToArray) End Function #End Region #Region "ListBox Items to Array String" Friend Function ListBoxToArray(ListBoxer As ListBox) As String() Dim arr As String() = {"*"} If ListBoxer.Items.Count > 0 Then arr = New String(ListBoxer.Items.Count - 1) {} For i As Integer = 0 To ListBoxer.Items.Count - 1 arr(i) = ListBoxer.Items(i).ToString Next End If Return arr End Function #End Region End Module -
Laicure revised this gist
Jan 26, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Imports System.Text Module StringManipulate #Region "Code Generator" Public Function CodeGen(sizer As Integer, customString As String) As String Dim charX As String = IIf(String.IsNullOrWhiteSpace(customString), "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz", customString).ToString -
Laicure created this gist
Jan 25, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ Imports System.Text Module StringManipulatorsSnips #Region "Code Generator" Public Function CodeGen(sizer As Integer, customString As String) As String Dim charX As String = IIf(String.IsNullOrWhiteSpace(customString), "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz", customString).ToString Dim Rand As New Random Dim BuildMe As New StringBuilder Dim idx, CodeSize, charXsize As Integer charXsize = charX.Length CodeSize = sizer For i As Integer = 1 To CodeSize idx = Rand.Next(0, charXsize) BuildMe.Append(charX.Substring(idx, 1)) Next Return BuildMe.ToString End Function #End Region #Region "Character Duplicate Remover" Public Function CharDupRemove(strx As String) As String Dim x() As Char = strx.ToCharArray Dim y As Generic.List(Of Char) y = x.Distinct.ToList Return String.Join("", y.ToArray) End Function #End Region End Module