X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/bce919af7b49bbd06223f79b8c37a53a3d263ff0..c7f63c8b9b12efd7b3c10b9f80cda06eaf32068f:/includes/utf8/docs/examples/1.php diff --git a/includes/utf8/docs/examples/1.php b/includes/utf8/docs/examples/1.php new file mode 100644 index 0000000..11ec77d --- /dev/null +++ b/includes/utf8/docs/examples/1.php @@ -0,0 +1,33 @@ +\n"; + +# Check it's a well formed UTF-8 string +require_once UTF8 . '/utils/validation.php'; +if ( utf8_is_valid($str) ) { + print "It's well formed UTF-8
\n"; +} else { + print "It's badly formed UTF-8 - this shouldn't happen
\n"; +} + +print "Num chars: ".utf8_strlen($str)."
\n"; + +print "Uppercase: ".utf8_strtoupper($str)."
\n"; + +# Load an additional function; +require_once UTF8 . '/strrev.php'; + +print "Reversed: ".utf8_strrev($str)."
\n"; +?> \ No newline at end of file