All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.icu.text.RbnfLenientScanner Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 1.2.0
Show newest version
/*
 *******************************************************************************
 * Copyright (C) 2009-2012, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */

package com.ibm.icu.text;

/**
 * Used by RBNF to leniently parse a string.
 *
 * @stable ICU 4.4
 */
public interface RbnfLenientScanner {
    /**
     * Returns true if a string consists entirely of ignorable
     * characters.
     * @param s The string to test
     * @return true if the string is empty or consists entirely of
     * characters that are ignorable.
     * @stable ICU 4.4
     */
    boolean allIgnorable(String s);

    /**
     * Matches characters in a string against a prefix and return
     * the number of chars that matched, or 0 if no match.  Only
     * primary-order differences are significant in determining
     * whether there's a match.  This means that the returned
     * value need not be the same as the length of the prefix.
     *
     * @param str The string being tested
     * @param prefix The text we're hoping to see at the beginning of "str"
     * @return the number of characters in "str" that were matched
     * @stable ICU 4.4
     */
    int prefixLength(String str, String prefix);

    /**
     * Searches a string for another string.  This might use a
     * Collator to compare strings, or just do a simple match.
     * @param str The string to search
     * @param key The string to search "str" for
     * @param startingAt The index into "str" where the search is to
     * begin
     * @return A two-element array of ints.  Element 0 is the position
     * of the match, or -1 if there was no match.  Element 1 is the
     * number of characters in "str" that matched (which isn't necessarily
     * the same as the length of "key")
     * @stable ICU 4.4
     */
    int[] findText(String str, String key, int startingAt);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy