move UTF8traits to the public realm for later consumption

r=dbaron r=jag (the string experts)
for bug 110531


git-svn-id: svn://10.0.0.236/trunk@109171 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
2001-11-29 02:53:48 +00:00
parent 9e1fb89e0a
commit 700d0e8fd2
4 changed files with 24 additions and 24 deletions

View File

@@ -1519,18 +1519,6 @@ NS_ConvertASCIItoUCS2::NS_ConvertASCIItoUCS2( const nsACString& aCString )
}
}
class UTF8traits
{
public:
static PRBool isASCII(char c) { return (c & 0x80) == 0x00; }
static PRBool isInSeq(char c) { return (c & 0xC0) == 0x80; }
static PRBool is2byte(char c) { return (c & 0xE0) == 0xC0; }
static PRBool is3byte(char c) { return (c & 0xF0) == 0xE0; }
static PRBool is4byte(char c) { return (c & 0xF8) == 0xF0; }
static PRBool is5byte(char c) { return (c & 0xFC) == 0xF8; }
static PRBool is6byte(char c) { return (c & 0xFE) == 0xFC; }
};
class CalculateUTF8Length
{
public: