diff options
author | Bruno Haible <bruno@clisp.org> | 2009-06-30 10:53:52 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-30 10:53:52 +0200 |
commit | a2db16e8e2a0a34c998178f9c1efd720e4cfdee9 (patch) | |
tree | 25895cf07fc8cba8a1522a6b6f02ef948fb33ff0 | |
parent | 116c15a81610cdeab05883d1a8e5149c1964ab20 (diff) | |
download | libunistring-a2db16e8e2a0a34c998178f9c1efd720e4cfdee9.tar.gz |
Add an example.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/unicase.texi | 14 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2009-06-30 Bruno Haible <bruno@clisp.org> + + * * doc/unicase.texi (Case mappings of substrings): Add an example. + 2009-06-29 Bruno Haible <bruno@clisp.org> New functions for case mapping of substrings. 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 |