1 Copyright (c) 2002-2005, International Business Machines Corporation and others. All Rights Reserved.
2 strsrch: a sample program which finds the occurrences of a pattern string in a source string, using user-defined collation rules.
4 This sample demonstrates
5 Creating a user-defined string search mechanism.
6 Finding all occurrences of a pattern string in a given source string.
9 strsrch.c Main source file
10 strsrch.sln Windows MSVC workspace. Double-click this to get started.
11 strsrch.vcproj Windows MSVC project file
13 To Build strsrch on Windows
14 1. Install and build ICU
15 2. In MSVC, open the workspace file icu\samples\strsrch\strsrch.sln
16 3. Choose a Debug or Release build.
20 1. Start a command shell window
21 2. Add ICU's bin directory to the path, e.g.
22 set PATH=c:\icu\bin;%PATH%
23 (Use the path to where ever ICU is on your system.)
24 3. cd into the strsrch directory, e.g.
25 cd c:\icu\source\samples\strsrch\debug
27 strsrch [options*] -source source_string -pattern pattern_string
30 1. Build ICU. strsrch is built automatically by default unless samples are turned off.
31 Specify an ICU install directory when running configure,
32 using the --prefix option. The steps to build ICU will look something
34 cd <icu directory>/source
35 runConfigureICU <platform-name> --prefix <icu install directory> [other options]
42 cd <icu directory>/source/samples/strsrch
47 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
51 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
52 If in doubt, run the sample using "gmake check", and note the name of
53 the variable that is used there. LD_LIBRARY_PATH is the correct name
54 for Linux and Solaris.