org.daisy.dotify.common.text.NonStandardHyphenationInfo Maven / Gradle / Ivy
The newest version!
package org.daisy.dotify.common.text;
class NonStandardHyphenationInfo {
private final String pattern;
private final String replacement;
private final int length;
/**
* Creates a new NonStandardHyphenationInfo
* @param replacement the replacement contains the characters to insert
* @param pattern
*
*
*/
NonStandardHyphenationInfo(String pattern, String replacement) {
super();
this.pattern = pattern;
this.replacement = replacement;
int charsCount = 0;
for (int i =0; icharsCount+2) {
throw new IllegalArgumentException("Only one soft hyphen or zero width space allowed.");
} else if (pattern.charAt(i)!='\u00ad' && pattern.charAt(i)!='\u200b') {
charsCount++;
}
}
if (charsCount
© 2015 - 2025 Weber Informatics LLC | Privacy Policy