# StringTest.txt # # String Process Test Suite # Date: 2002-04-10 [HSC] # Format: # # Columns (c1, c2,...) are separated by semicolons # Comments are indicated with hash marks # Different sections are separated by "@" followed by a part number. # The interpretation of the fields varies according to the section, # using the following conventions: # # - Strings are represented by lists of code point values in hex, with each # code point separated by a space. # - Code points are represented by their hex values. # - Offsets are represented in decimal, and are zero-based. # # @Part0 # Get the nth code point in the string # Format: string; offset; code point; # 0061 0041 0062 0041; 1; 0041; 0061 0041 0000 E001; 2; 0000; 0061 0041 0000 E001; 3; E001; 0061 4E00 0030 0031; 2; 0030; 0061 4E00 4E10 4E70; 2; 4E10; 0061 4E00 10030 0020; 1; 4E00; 0061 4E00 10030 0020; 2; 10030; 0061 4E00 10030 0020; 3; 0020; 10030 10031 10032 0000 10033; 2; 10032; 10030 10031 10032 0000 10033; 3; 0000; 10030 10031 10030 10031 10030; 2; 10030 # @Part2 # Find the first code point offset in a string of a code point value. # Format: string; code point; offset; # 0061 0041 0062 0041; 0041; 1; 0061 0041 0000 E001; 0000; 2; 0061 0041 0000 E001; E001; 3; 0061 4E00 0030 0031; 0030; 2; 0061 4E00 4E10 4E70; 4E10; 2; 0061 4E00 10030 0020; 4E00; 1; 0061 4E00 10030 0020; 10030; 2; 0061 4E00 10030 0020; 0020; 3; 10030 10031 10032 0000 10033; 10032; 2; 10030 10031 10032 0000 10033; 0000; 3; 10030 10031 10030 10031 10030; 10030; 0; # @Part3 # Get the substring by specifying the start and limit code point offsets # Format: string; start offset; limit offset; substring; # 0061 0041 0062 0042 0063 0043; 1; 3; 0041 0062; 0061 0041 0000 E001 4E00 0030; 2; 5; 0000 E001 4E00; 0061 4E00 10030 0020 10031 10032; 1; 3; 4E00 10030; 0061 4E00 10030 0020 10031 10032; 1; 4; 4E00 10030 0020; 0061 4E00 10030 0020 10031 10032; 3; 5; 0020 10031; 10030 10031 10032 0000 10033; 1; 3; 10031 10032; 10030 10031 10032 0000 10033; 2; 4; 10032 0000; 10030 10031 10032 0000 10033; 3; 4; 0000; # @Part4 # Compare two strings in code point order # Format: string1; string2; ordering; # ordering: -1 if string1 is less than string2, # 0 if string1 is equal to string2, # 1 if string1 is greater than string2 # 0061 0041 0062 0042; 0061 0041 0062 2020; -1; 0061 0041 0000 E001; 0041 0000; 1; 2020 4E00; ff61 4E01; -1; 4E00 ff61; 4E00 10002; -1; 2020 10002 0001; 2020 ff61 0001; 1; 2020 10002 0001; 2020 ff61 1010; 1; 2020 10002 0001; 2020 10033 0001; -1; ff61 0000; 10030 0000; -1; 10030 0000; 10033 0000; -1; # @Part5 # Count the number of code points in a string. # Format: string; number; # 0061 0041 0062 0000; 4; 0061 0041 0000 E001; 4; 0061 0041 0000 E001; 4; 0061 4E00 0030 0031; 4; 0061 4E00 10030 0020; 4; 0061 4E00 10030 0020; 4; 0061 4E00 10030 0020; 4; 10030 10031 10032 0000 10033; 5; 10030 10031 10030 10031 10030; 5; #EOF