You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2019/08/07 22:26:27 UTC
[lucenenet] 30/42: Lucene.Net.Util.StringHelper: Added API note to
make StartsWith and EndsWith into extension methods for BytesRef.
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 4463f5a71ad162328a54d46359f7f45441797f0e
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Mon Aug 5 08:51:50 2019 +0700
Lucene.Net.Util.StringHelper: Added API note to make StartsWith and EndsWith into extension methods for BytesRef.
---
src/Lucene.Net/Util/StringHelper.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Lucene.Net/Util/StringHelper.cs b/src/Lucene.Net/Util/StringHelper.cs
index 03bdca4..0dcbac2 100644
--- a/src/Lucene.Net/Util/StringHelper.cs
+++ b/src/Lucene.Net/Util/StringHelper.cs
@@ -169,7 +169,7 @@ namespace Lucene.Net.Util
/// The expected prefix </param>
/// <returns> Returns <c>true</c> if the <paramref name="ref"/> starts with the given <paramref name="prefix"/>.
/// Otherwise <c>false</c>. </returns>
- public static bool StartsWith(BytesRef @ref, BytesRef prefix)
+ public static bool StartsWith(BytesRef @ref, BytesRef prefix) // LUCENENET TODO: API - convert to extension method
{
return SliceEquals(@ref, prefix, 0);
}
@@ -184,7 +184,7 @@ namespace Lucene.Net.Util
/// The expected suffix </param>
/// <returns> Returns <c>true</c> if the <paramref name="ref"/> ends with the given <paramref name="suffix"/>.
/// Otherwise <c>false</c>. </returns>
- public static bool EndsWith(BytesRef @ref, BytesRef suffix)
+ public static bool EndsWith(BytesRef @ref, BytesRef suffix) // LUCENENET TODO: API - convert to extension method
{
return SliceEquals(@ref, suffix, @ref.Length - suffix.Length);
}