org.apache.lucene.util

Class StringHelper


public abstract class StringHelper
extends Object

Methods for manipulating strings. $Id: StringHelper.java 472959 2006-11-09 16:21:50Z yonik $

Method Summary

static int
stringDifference(String s1, String s2)
Compares two strings, character by character, and returns the first position where the two strings differ from one another.

Method Details

stringDifference

public static final int stringDifference(String s1,
                                         String s2)
Compares two strings, character by character, and returns the first position where the two strings differ from one another.
Parameters:
s1 - The first string to compare
s2 - The second string to compare
Returns:
The first position where the two strings differ.

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.