// todo: support for tabs?
public static String replaceLeadingSpacesWithNbsps (String str)
    {
        // todo: support for tabs?
        Matcher m = _LeadingSpacesPattern.matcher(str);
        StringBuffer buf = new StringBuffer();
        while (m.find()) {
            int spaceCount = m.group(1).length();
            m.appendReplacement(buf, AWUtil.repeatedString("&nbsp;", spaceCount));
        }
        m.appendTail(buf);
        return buf.toString();
    }
public static String replaceLeadingSpacesWithNbsps (String str)
{
// todo: support for tabs?
Matcher m = _LeadingSpacesPattern.matcher(str);
StringBuffer buf = new StringBuffer();
public static String replaceLeadingSpacesWithNbsps (String str)
{
// todo: support for tabs?
Matcher m = _LeadingSpacesPattern.matcher(str);
StringBuffer buf = new StringBuffer();
while (m.find()) {
int spaceCount = m.group(1).length();
m.appendReplacement(buf, AWUtil.repeatedString("&nbsp;", spaceCount));
}
m.appendTail(buf);
return buf.toString();
}
public static String replaceLeadingSpacesWithNbsps (String str)
{
// todo: support for tabs?
Matcher m = _LeadingSpacesPattern.matcher(str);
StringBuffer buf = new StringBuffer();
while (m.find()) {
int spaceCount = m.group(1).length();
m.appendReplacement(buf, AWUtil.repeatedString("&nbsp;", spaceCount));
}
m.appendTail(buf);
return buf.toString();
}