This file contains 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 characters
function setWeatherIcon(condid) { | |
switch(condid) { | |
case '0': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '1': var icon = '<i class="wi-storm-showers"></i>'; | |
break; | |
case '2': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '3': var icon = '<i class="wi-thunderstorm"></i>'; |
This file contains 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 characters
static string RemoveDiacritics(string text) | |
{ | |
var normalizedString = text.Normalize(NormalizationForm.FormD); | |
var stringBuilder = new StringBuilder(); | |
foreach (var c in normalizedString) | |
{ | |
var unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c); | |
if (unicodeCategory != UnicodeCategory.NonSpacingMark) | |
{ |
This file contains 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 characters
public static string ToInvarianTitleCase(this string self) | |
{ | |
if (string.IsNullOrWhiteSpace(self)) | |
{ | |
return self; | |
} | |
return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(self); | |
} |
This file contains 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 characters
var inputString = "<html>blablalba</html>" | |
string cleanTextFromHtml = Regex.Replace(inputTextVar, @"<[^>]+>| ", "").Trim(); |
NewerOlder