Skip to content

Commit c49d6c5

Browse files
committed
chore: rename compiled regex expressions
1 parent 1b480d4 commit c49d6c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Uno.UWP/Globalization/DateTimeFormatting/DateTimeFormatter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ string ConstructPattern(string str)
804804

805805
var builder = new StringBuilder();
806806

807-
foreach (var part in IsWithinSingleQuotesRegex().Split(str))
807+
foreach (var part in StringLiteralRegex().Split(str))
808808
{
809809
// skip empty block
810810
if (part.Length == 0)
@@ -822,7 +822,7 @@ string ConstructPattern(string str)
822822
// for non-quoted parts, further segment them by grouping repeated character(s)
823823
else
824824
{
825-
foreach (var segment in DateTimeFormatPartsRegex().EnumerateMatches(part))
825+
foreach (var segment in RepeatedCharactersRegex().EnumerateMatches(part))
826826
{
827827
AddToBuilder(builder, part[segment.Index], segment.Length);
828828
}
@@ -834,8 +834,8 @@ string ConstructPattern(string str)
834834
}
835835

836836
[GeneratedRegex(@"('[^']+')")]
837-
private static partial Regex IsWithinSingleQuotesRegex();
837+
private static partial Regex StringLiteralRegex();
838838

839839
[GeneratedRegex(@"(.)(\1+)?")]
840-
private static partial Regex DateTimeFormatPartsRegex();
840+
private static partial Regex RepeatedCharactersRegex();
841841
}

0 commit comments

Comments
 (0)