litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package org.litesoft.aokeyhole.toolkit;
import org.litesoft.core.util.*;
public class SingleLineNotes
{
public static String[] convertStringToLines( String pNotesAsString )
{
String[] rv = UtilsCommon.parseChar( normalize( pNotesAsString ), '|' );
return (rv.length == 0) ? null : rv;
}
public static String convertLinesToString( String[] pNotes )
{
if ( (pNotes == null) || (pNotes.length == 0) )
{
return null;
}
StringBuilder sb = new StringBuilder( normalize( pNotes[0] ) );
for ( int i = 1; i < pNotes.length; i++ )
{
sb.append( '|' ).append( normalize( pNotes[i] ) );
}
return sb.toString();
}
private static String normalize( String pText )
{
return UtilsCommon.normalizeNewLines( UtilsCommon.deNull( pText ) ).replace( '\n', '|' );
}
}
|
Revision |
Author |
Commited |
Message |
787
|
GeorgeS
|
Mon 30 Jul, 2012 03:00:12 +0000 |
|