Show / Hide Table of Contents

    Class StringHelper

    Methods for manipulating strings.

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    StringHelper
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class StringHelper : object

    Fields

    | Improve this Doc View Source

    GOOD_FAST_HASH_SEED

    Pass this as the seed to Murmurhash3_x86_32(Byte[], Int32, Int32, Int32).

    Declaration
    public static readonly int GOOD_FAST_HASH_SEED
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    VersionComparer

    Returns a IComparer{string} over versioned strings such as X.YY.Z

    This is a Lucene.NET INTERNAL API, use at your own risk
    Declaration
    public static IComparer<string> VersionComparer { get; }
    Property Value
    Type Description
    IComparer<System.String>

    Methods

    | Improve this Doc View Source

    BytesDifference(BytesRef, BytesRef)

    Compares two BytesRef, element by element, and returns the number of elements common to both arrays.

    Declaration
    public static int BytesDifference(BytesRef left, BytesRef right)
    Parameters
    Type Name Description
    BytesRef left

    The first BytesRef to compare.

    BytesRef right

    The second BytesRef to compare.

    Returns
    Type Description
    System.Int32

    The number of common elements.

    | Improve this Doc View Source

    EndsWith(BytesRef, BytesRef)

    Returns true if the ref ends with the given suffix. Otherwise false.

    Declaration
    public static bool EndsWith(BytesRef ref, BytesRef suffix)
    Parameters
    Type Name Description
    BytesRef ref

    The BytesRef to test.

    BytesRef suffix

    The expected suffix

    Returns
    Type Description
    System.Boolean

    Returns true if the ref ends with the given suffix. Otherwise false.

    | Improve this Doc View Source

    Equals(String, String)

    Declaration
    public static bool Equals(string s1, string s2)
    Parameters
    Type Name Description
    System.String s1
    System.String s2
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Murmurhash3_x86_32(BytesRef, Int32)

    Returns the MurmurHash3_x86_32 hash. Original source/tests at https://github.com/yonik/java_util/.

    Declaration
    public static int Murmurhash3_x86_32(BytesRef bytes, int seed)
    Parameters
    Type Name Description
    BytesRef bytes
    System.Int32 seed
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Murmurhash3_x86_32(Byte[], Int32, Int32, Int32)

    Returns the MurmurHash3_x86_32 hash. Original source/tests at https://github.com/yonik/java_util/.

    Declaration
    public static int Murmurhash3_x86_32(byte[] data, int offset, int len, int seed)
    Parameters
    Type Name Description
    System.Byte[] data
    System.Int32 offset
    System.Int32 len
    System.Int32 seed
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    StartsWith(BytesRef, BytesRef)

    Returns true if the ref starts with the given prefix. Otherwise false.

    Declaration
    public static bool StartsWith(BytesRef ref, BytesRef prefix)
    Parameters
    Type Name Description
    BytesRef ref

    The BytesRef to test.

    BytesRef prefix

    The expected prefix

    Returns
    Type Description
    System.Boolean

    Returns true if the ref starts with the given prefix. Otherwise false.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)