home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
i18nv104.zip
/
SAMPLE
/
WSTR
/
READ.ME
< prev
next >
Wrap
Text File
|
1996-02-13
|
4KB
|
126 lines
===============================================================================
Internationalization (I18N) For OS/2
===============================================================================
Copyright IBM Corporation -- 1993, 1994, 1995
DISCLAIMER: This package is not a full implementation of the X/Open XPG4
specification and does not make any claims of XPG4 branding. It implements
only the portions of the XPG4 specification which deal with
internationalization.
X/Open is a trademark of the X/Open Company Limited.
===============================================================================
/************************/
/*** Contents ***/
/************************/
1. Overview
2. Files in this directory
3. How to run the sample program
4. How to compile the sample program
1. Overview
============
The sample program in this directory demonstrates the use of the wide character
string functions. XPG4 provides a whole set of replacement functions for the
string functions found in <string.h>, but for wide characters. Functions are
provided for copying, appending, scanning, substringing, tokenizing, getting
the length, and others.
2. Files in this directory
===========================
File Purpose
------------------------------------------------------------------------------
wstr.c Source code for the wstr sample program.
wstr.def Definition file needed for compiling the program.
wstr.mak Make file used to compile the sample.
wstr.exe Compiled version of the wstr sample.
build.cmd A command file which will compile and link the sample program.
read.me This file.
3. How to run the sample program
=================================
The following steps show how the program can be run.
1) Run the \i18n\bin\new_vars command file (or have the environment
variables already set).
2) Set the value of either LC_ALL or LANG to: En_US (US English).
Ex: set LANG=En_US
3) Execute the wstr.exe program.
Ex: wstr
4) The output from the program should be:
Copy and concat functions:
--------------------------
Original string: This is a wchar_t string.
Length of the string is: 25
Add to end of the string: This is a wchar_t string. Add this on the
end!
Copy the first 6 characters of the string: This i
Concat 13 characters on the end: This iis an added s
Compare functions:
------------------
Are the two strings the same? No
Are the first 10 characters of the two strings the same? Yes
Scanning functions:
-------------------
Using the string: This is string 1.
First occurance of 's' is: s is string 1.
First occurance of ' is' is: is string 1.
Last occurance of: 's' is: string 1.
Scan: 'This is string 1.' for first occurance of: 'stuv': 's
is string 1.'
Substring length functions:
---------------------------
The first 5 characters of "cabbage" are found in "abc"
The first 2 characters of "cabbage" are not found in "bde"
Tokenizing functions:
---------------------
Tokenizing: 'This line has spaces,commas,and periods.!' based on: ' '
Token: This
Token: line
Token: has
Token: spaces
Token: commas
Token: and
Token: periods
Token: !
4. How to compile the sample program
=====================================
NOTE: The sample program is already compiled for you. If you want to see the
behavior of the program, you can just run it. The following instructions
are needed only if you want to modify the program and recompile it.
To compile the sample application:
1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
correctly on your system.
2) cd to the directory which contains the info source files.
3) Type "build" at the command prompt.