Παρουσίαση με Ετικέτες

.NET String extension methods to check for array of prefixes or suffixes
05 Απριλίου 13 10:51 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
Seems StartsWith and EndsWith methods of String class in .NET are missing a version that accepts multiple (as an array) prefixes or suffixes respectively when testing the string. To achieve this I just added the following extension methods to StringExtensions class (of Utils.Extensions namespace) under Utils.Silverlight project at the ClipFlair source code. public static bool [...]
Δημοσίευση στην κατηγορία: , , , , , , , , , , , , ,
.NET String class extensions to replace prefix or suffix
26 Μαρτίου 13 05:47 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
Just added the following extension methods to StringExtensions class (of Utils.Extensions namespace) under Utils.Silverlight project at the ClipFlair source code. public static string ReplacePrefix( this string s, string fromPrefix, string toPrefix, StringComparison comparisonType) { return (s.StartsWith(fromPrefix, comparisonType)) ? toPrefix + s.Substring(fromPrefix.Length) : s; } public static string ReplacePrefix( this string s, string[] fromPrefix, string toPrefix, [...]
Δημοσίευση στην κατηγορία: , , , , , , , , ,

Search

Go

Ιστορικό Δημοσιεύσεων

Συνδρομές