Skip to content

Commit

Permalink
Merge pull request #1308 from sillsdev/prepare-for-version-13
Browse files Browse the repository at this point in the history
Update changelog to prepare for v13.0.0 release
  • Loading branch information
tombogle authored Dec 7, 2023
2 parents ffd6e09 + 93d7d09 commit 1b8681f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [13.0.0] - 2023-12-07

### Added

- [SIL.Core] `RobustFile.Open`, `RobustFile.AppendAllText`, `RobustFile.WriteAllLines`, `RobustFile.GetAccessControl`, `RobustIO.EnumerateFilesInDirectory`, `RobustIO.EnumerateDirectoriesInDirectory`, `RobustIO.EnumerateEntriesInDirectory`, `RobustIO.RequireThatDirectoryExists`, `RobustIO.GetFileStream`, `RobustIO.ReadAllTextFromFileWhichMightGetWrittenTo`, and `RobustIO.IsFileLocked` methods
Expand Down Expand Up @@ -360,7 +362,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [SIL.NUnit3Compatibility] new project/package that allows to use NUnit3 syntax with NUnit2
projects

[Unreleased]: https://github.com/sillsdev/libpalaso/compare/v12.0.1...master
[Unreleased]: https://github.com/sillsdev/libpalaso/compare/v13.0.0...master
[13.0.0]: https://github.com/sillsdev/libpalaso/compare/v12.0.1...v13.0.0
[12.0.1]: https://github.com/sillsdev/libpalaso/compare/v12.0.0...v12.0.1
[12.0.0]: https://github.com/sillsdev/libpalaso/compare/v11.0.1...v12.0.0
[11.0.1]: https://github.com/sillsdev/libpalaso/compare/v11.0.0...v11.0.1
Expand Down
21 changes: 6 additions & 15 deletions SIL.Core/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ public static int[] ToIntArray(this string str)
string[] pieces = str.Split(',');
foreach (string piece in pieces)
{
int i;
if (int.TryParse(piece, out i))
if (int.TryParse(piece, out var i))
array.Add(i);
}
}
Expand All @@ -84,7 +83,7 @@ public static string FormatWithErrorStringInsteadOfException(this string format,
argList = argList + arg + ",";
}

argList = argList.Trim(new char[] { ',' });
argList = argList.Trim(',');
return "FormatWithErrorStringInsteadOfException(" + format + "," + argList +
") Exception: " + e.Message;
}
Expand Down Expand Up @@ -112,7 +111,7 @@ public static string EscapeAnyUnicodeCharactersIllegalInXml(this string text)
return text.Normalize(NormalizationForm.FormC);
}

private static object _lockUsedForEscaping = new object();
private static readonly object _lockUsedForEscaping = new object();
private static StringBuilder _bldrUsedForEscaping;
private static XmlWriterSettings _settingsUsedForEscaping;
private static XmlWriter _writerUsedForEscaping;
Expand Down Expand Up @@ -458,19 +457,15 @@ public static string GetLongestUsefulCommonSubstring(this string s1, string s2,
cchMatch += IsSurrogate(s1[ich + cchMatch]) ? 2: 1;
} while (s1.IsLikelyWordForming(ich + cchMatch));

//if (cchMatch > maxLength)
//{
// ich += cchMatch;
// continue;
//}
string candidate = s1.Substring(ich, cchMatch);
int ichOrc = candidate.IndexOf(kszObject, StringComparison.Ordinal);
int ichOrc = s1.IndexOf(kszObject, ich, cchMatch, StringComparison.Ordinal);
if (ichOrc >= 0)
{
ich += ichOrc;
continue;
}

string candidate = s1.Substring(ich, cchMatch);

int ichMatch = 0;
do
{
Expand All @@ -489,8 +484,6 @@ public static string GetLongestUsefulCommonSubstring(this string s1, string s2,
else if (!IsWhiteSpace(ch))
candidate = s1.Substring(ich, cchMatch + 1); // include punctuation
cchMatch += incr;
//if (cchMatch > maxLength)
// break;
}
else
{
Expand All @@ -499,8 +492,6 @@ public static string GetLongestUsefulCommonSubstring(this string s1, string s2,
cchMatch += IsSurrogate(s1[ich + cchMatch]) ? 2: 1;
} while (s1.IsLikelyWordForming(ich + cchMatch));

//if (cchMatch > maxLength)
// break;
candidate = s1.Substring(ich, cchMatch);
}
} while (true);
Expand Down

0 comments on commit 1b8681f

Please sign in to comment.