Base64 subscription fetcher works, some ui changes
This commit is contained in:
@@ -12,8 +12,9 @@ public static class FlagEmojiParser
|
||||
/// <summary>
|
||||
/// Parses a string and returns a list of ISO 3166-1 alpha-2 country codes found as emojis.
|
||||
/// </summary>
|
||||
public static List<string> ExtractCountryCodes(string text)
|
||||
public static List<string> ExtractCountryCodes(string text, out List<string> countryIndicators)
|
||||
{
|
||||
countryIndicators = [];
|
||||
var countryCodes = new List<string>();
|
||||
if (string.IsNullOrEmpty(text)) return countryCodes;
|
||||
|
||||
@@ -45,6 +46,7 @@ public static class FlagEmojiParser
|
||||
var c2 = (char)('A' + letterOffset);
|
||||
|
||||
countryCodes.Add($"{c1}{c2}");
|
||||
countryIndicators.Add($"{char.ConvertFromUtf32(RegionalIndicatorStart + firstLetterCode.Value)}{char.ConvertFromUtf32(RegionalIndicatorStart + letterOffset)}");
|
||||
|
||||
// Reset to look for the next flag
|
||||
firstLetterCode = null;
|
||||
@@ -59,4 +61,9 @@ public static class FlagEmojiParser
|
||||
|
||||
return countryCodes;
|
||||
}
|
||||
|
||||
public static List<string> ExtractCountryCodes(string text)
|
||||
{
|
||||
return ExtractCountryCodes(text, out _);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user