1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>oscl_string_utf8.h File Reference</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5</head><body> 6<!-- Generated by Doxygen 1.2.18 --> 7<center> 8<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9<hr><h1>oscl_string_utf8.h File Reference</h1>Utilities to validate and truncate UTF-8 encoded strings. 10<a href="#_details">More...</a> 11<p> 12<code>#include "<a class="el" href="oscl__base_8h-source.html">oscl_base.h</a>"</code><br> 13 14<p> 15<a href="oscl__string__utf8_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0> 16<tr><td></td></tr> 17<tr><td colspan=2><br><h2>Functions</h2></td></tr> 18<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF bool </td><td valign=bottom><a class="el" href="group__osclutil.html#a40">oscl_str_is_valid_utf8</a> (const uint8 *str_buf, uint32 &num_valid_characters, uint32 max_bytes=0, uint32 max_char_2_valid=0, uint32 *num_byte_4_char=NULL)</td></tr> 19<tr><td> </td><td><font size=-1><em>Check if the input string contains any illegal UTF-8 character. The function scans the string and validate that each character is a valid utf-8. It stops at the first NULL character, invalid character or the max_byte value. The string is valid if and only if every character is a valid utf-8 character and the scanning stopped on a character boundary.</em> <a href="group__osclutil.html#a40"></a><em></em></font><br><br></td></tr> 20<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32 </td><td valign=bottom><a class="el" href="group__osclutil.html#a41">oscl_str_truncate_utf8</a> (uint8 *str_buf, uint32 max_char, uint32 max_bytes=0)</td></tr> 21<tr><td> </td><td><font size=-1><em>Truncates the UTF-8 string upto the required size.</em> <a href="group__osclutil.html#a41"></a><em></em></font><br><br></td></tr> 22</table> 23<hr><a name="_details"></a><h2>Detailed Description</h2> 24Utilities to validate and truncate UTF-8 encoded strings. 25<p> 26 27<p> 28<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 29<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 30</small></address> 31</body> 32</html> 33