public String hyphenate(String word, String separator, boolean allowContextChanges) {
        requireValidHandle();
        if (!isValidInput(word) || !isValidInput(separator)) {
            return word;
        }
        ByteArray cHyphenated = getLib().voikkoInsertHyphensCstr(
                handle, s2n(word), s2n(separator), boolToInt(allowContextChanges));
        String hyphenated = cHyphenated.toString();
        getLib().voikkoFreeCstr(cHyphenated);
        return hyphenated;
    }
public String hyphenate ( String word , String separator , boolean allowContextChanges ) { requireValidHandle ( ) ; if ( ! isValidInput ( word ) || ! isValidInput ( separator ) ) { return word ; } ByteArray cHyphenated = getLib ( ) . voikkoInsertHyphensCstr ( handle , s2n ( word ) , s2n ( separator ) , boolToInt ( allowContextChanges ) ) ; String hyphenated = cHyphenated . toString ( ) ; getLib ( ) . voikkoFreeCstr ( cHyphenated ) ; return hyphenated ; }
A convenience function that uses getHyphenationPattern and returns the word in
hyphenated form. For example, in order to insert soft hyphens for automatic hyphenation
in HTML text use hyphenate(word, "&shy;", false)
@param word The word to be hypnenated
@param separtor The separator to be inserted at hyphenation point
@param allowContextChanges Whether to allow hyphenation at points where inserting
the hyphen will lead to other changes in the word
@return the given word in fully hyphenated form.