Visiting from over in Python land.

We use zwiki for an intranet at work, but as we're all J2EE developers perhaps JSPWiki would be a good fit. This seems to be the most promising Java based wiki I've come across. Nice balance between features & simplicity. Will have a play around...

Notice the titles go a bit funny on pages like JSPWiki, with the acronyms being split. Not sure where we post code yet, so putting it here... but this modified beautifyTitle() should fix it:

public String beautifyTitle( String title ) 
    StringBuffer result = new StringBuffer();

    for( int i = 0; i < title.length(); i++ )
        if( Character.isUpperCase(title.charAt(i)) && i > 0)
            if (Character.isLowerCase(title.charAt(i+1)) || Character.isLowerCase(title.charAt(i-1))) {
                result.append(' ');
        result.append( title.charAt(i) );
    return result.toString();

Cool, thanks. However, your code fails if the last character of a page name is in uppercase. :-) --JanneJalkanen

Quite right, silly i+1. Checking for length first:

if (((i < title.length()-1) && Character.isLowerCase(title.charAt(i+1))) 
|| Character.isLowerCase(title.charAt(i-1)))

Bit unwieldy but it works :)

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 02-Oct-2002 12:52 by JohnGreenaway