From a2db16e8e2a0a34c998178f9c1efd720e4cfdee9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 30 Jun 2009 10:53:52 +0200 Subject: Add an example. --- doc/unicase.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/unicase.texi b/doc/unicase.texi index 89df977..14b46be 100644 --- a/doc/unicase.texi +++ b/doc/unicase.texi @@ -216,6 +216,20 @@ Returns the titlecase mapping of a string that is surrounded by a prefix and a suffix. @end deftypefun +For example, to uppercase the UTF-8 substring between @code{s + start_index} +and @code{s + end_index} of a string that extends from @code{s} to +@code{s + u8_strlen (s)}, you can use the statements + +@smallexample +size_t result_length; +uint8_t result = + u8_ct_toupper (s + start_index, end_index - start_index, + u8_casing_prefix_context (s, start_index), + u8_casing_suffix_context (s + end_index, + u8_strlen (s) - end_index), + iso639_language, NULL, NULL, &result_length); +@end smallexample + @node Case insensitive comparison @section Case insensitive comparison -- cgit v1.2.1