Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class StringHelper

    Methods for manipulating strings.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    StringHelper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public static class StringHelper

    Properties

    GOOD_FAST_HASH_SEED

    Methods for manipulating strings.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    [Obsolete("Use GoodFastHashSeed instead. This field will be removed in 4.8.0 release candidate.")]
    public static int GOOD_FAST_HASH_SEED { get; }
    Property Value
    Type Description
    int

    GoodFastHashSeed

    Pass this as the seed to Murmurhash3_x86_32(byte[], int, int, int).

    Declaration
    public static int GoodFastHashSeed { get; }
    Property Value
    Type Description
    int

    VersionComparer

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

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static IComparer<string> VersionComparer { get; }
    Property Value
    Type Description
    IComparer<string>

    Methods

    BytesDifference(BytesRef, BytesRef)

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

    Declaration
    public static int BytesDifference(this 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
    int

    The number of common elements.

    EndsWith(BytesRef, BytesRef)

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

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

    The BytesRef to test.

    BytesRef suffix

    The expected suffix

    Returns
    Type Description
    bool

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

    Equals(string, string)

    Methods for manipulating strings.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool Equals(string s1, string s2)
    Parameters
    Type Name Description
    string s1
    string s2
    Returns
    Type Description
    bool

    Murmurhash3_x86_32(BytesRef, int)

    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
    int seed
    Returns
    Type Description
    int

    Murmurhash3_x86_32(byte[], int, int, int)

    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
    byte[] data
    int offset
    int len
    int seed
    Returns
    Type Description
    int

    StartsWith(BytesRef, BytesRef)

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

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

    The BytesRef to test.

    BytesRef prefix

    The expected prefix

    Returns
    Type Description
    bool

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

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.