public class CharUtils
extends Object
Modifier and Type | Field and Description |
---|---|
private static HashMap<String,CharMap> |
accentMapCache
Used to avoid recreating AccentMap objects all the time
|
Constructor and Description |
---|
CharUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
applyAccentMap(XPathContext context,
String filePath,
String str)
Applies an accent map to a string, normalizing spaces in the process.
|
private static CharMap |
getAccentMap(XPathContext context,
String filePath)
Get the accent map corresponding to a file.
|
private static HashMap<String,CharMap> accentMapCache
private static CharMap getAccentMap(XPathContext context, String filePath) throws IOException
IOException
- if we can't read the file.public static String applyAccentMap(XPathContext context, String filePath, String str) throws IOException
context
- Context used to figure out which stylesheet is calling
the function.filePath
- Path to the accent map file in question (typically
leading to conf/accentFolding/accentMap.txt)str
- The string whose characters should be mapped.IOException