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
30
31
32
33
34
35
36
37
38
39
40
41
package com.temp.shared.utils;

public class CharacterUtils {
    public static final int NEWLINE = 10;
    public static final int DEL = 127;
    public static final int HIBIT_SPACE = 160;

    private static final String UNACCEPTABLE_NON_CONTROL_FILENAME_CHARACTERS = "|\\?*<\":>+[]/";

    public static boolean isUnacceptableNonControlFilenameChar( char c ) {
        return (UNACCEPTABLE_NON_CONTROL_FILENAME_CHARACTERS.indexOf( c ) != -1);
    }

    public static boolean isControlChar( char c ) {
        return (c < ' ') || ((DEL <= c) && (c < HIBIT_SPACE));
    }

    public static boolean isDisplayable7BitAsciiAllowingSpaceAndNewline( char c ) {
        return (c == NEWLINE) || ((' ' <= c) && (c <= DEL));
    }

    public static boolean isAlphaNumericUnderScore7BitAscii( char c ) {
        return isNumeric( c ) || is7BitAlphaUnderScore( c );
    }

    public static boolean is7BitAlphaUnderScore( char c ) {
        return (c == '_') || is7BitAlpha( c );
    }

    public static boolean is7BitAlphaNumeric( char c ) {
        return isNumeric( c ) || is7BitAlpha( c );
    }

    public static boolean is7BitAlpha( char c ) {
        return ((('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z')));
    }

    public static boolean isNumeric( char c ) {
        return (('0' <= c) && (c <= '9'));
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/shared/utils/CharacterUtils.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

626 Diff Diff GeorgeS picture GeorgeS Wed 11 Apr, 2012 19:39:41 +0000
600 Diff Diff GeorgeS picture GeorgeS Sun 05 Feb, 2012 18:55:58 +0000

Sync-n

595 GeorgeS picture GeorgeS Sat 21 Jan, 2012 16:54:12 +0000