Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
code_snippets:csharp_snippets [2014/06/17 18:18] – smark | code_snippets:csharp_snippets [2014/06/19 16:19] (current) – smark | ||
---|---|---|---|
Line 40: | Line 40: | ||
</ | </ | ||
- | === int OccurancesInString(String Haystack, String Needle) === | + | === int OccurrencesInString(String Haystack, String Needle) === |
+ | Counts the number of occurrences of Needle in Haystack. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
- | /// Counts the number of occurances | + | /// Counts the number of occurrences |
/// </ | /// </ | ||
/// <param name=" | /// <param name=" | ||
/// <param name=" | /// <param name=" | ||
/// < | /// < | ||
- | public static int OccurancesInString(String Haystack, String Needle) { | + | public static int OccurrencesInString(String Haystack, String Needle) { |
return Regex.Matches(Haystack, | return Regex.Matches(Haystack, | ||
} | } | ||
Line 55: | Line 55: | ||
=== void PrintArrayList(ArrayList InputArray) === | === void PrintArrayList(ArrayList InputArray) === | ||
+ | Prints an ArrayList object to the console. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
Line 70: | Line 70: | ||
=== void DumpByteArrayToFile(byte[] inputBytes, String FileName) === | === void DumpByteArrayToFile(byte[] inputBytes, String FileName) === | ||
+ | Dumps a byte[] Array to a file. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
Line 88: | Line 88: | ||
=== void DumpStringToFile(String inputString, | === void DumpStringToFile(String inputString, | ||
+ | Dumps a String to a file. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
Line 106: | Line 106: | ||
=== void PrintCharArrASCII(char[] inputCharArr) === | === void PrintCharArrASCII(char[] inputCharArr) === | ||
+ | Prints the ASCII values of every character in a character array delimited by a pipe character to the Console. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
Line 122: | Line 122: | ||
=== void PrintStringASCII(String inputStr) === | === void PrintStringASCII(String inputStr) === | ||
+ | Prints the ASCII values of every character in a string delimited by a pipe character to the Console. | ||
<code c#> | <code c#> | ||
/// < | /// < | ||
Line 139: | Line 139: | ||
=== void PrintByteArrASCII(byte[] inputByteArr) === | === void PrintByteArrASCII(byte[] inputByteArr) === | ||
+ | Prints the ASCII values of every character in a character array delimited by a pipe character to the Console. | ||
<code c#> | <code c#> | ||
/// < | /// < |