Subversion Repository Public Repository

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
package org.litesoft.core.typeutils;

public class Paths
{
    public static boolean endsWithSep( String pPath )
    {
        return (pPath != null) && Characters.isPathSep( pPath.charAt( pPath.length() - 1 ) );
    }

    public static int lastSepAt( String pPath )
    {
        if ( pPath != null )
        {
            for ( int at = pPath.length(); --at >= 0; )
            {
                if ( Characters.isPathSep( pPath.charAt( at ) ) )
                {
                    return at;
                }
            }
        }
        return -1;
    }

    public static String forwardSlash( String pPath )
    {
        return pPath.replace( '\\', '/' );
    }
}

Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/core/typeutils/Paths.java

Diff revisions: vs.
Revision Author Commited Message
822 GeorgeS picture GeorgeS Sun 19 Aug, 2012 01:03:51 +0000