Translation update done using Pootle.
[phpmyadmin/madhuracj.git] / libraries / string_native.lib.php
blob86832fa8ecb9c69e601ba4abc71501650628fc7d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Specialized String Functions for phpMyAdmin
6 * Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
7 * http://www.orbis-terrarum.net/?l=people.robbat2
9 * Defines a set of function callbacks that have a pure C version available if
10 * the "ctype" extension is available, but otherwise have PHP versions to use
11 * (that are slower).
13 * The SQL Parser code relies heavily on these functions.
15 * @package PhpMyAdmin-String-Native
18 /**
19 * Returns length of string depending on current charset.
21 * @param string string to count
22 * @return int string length
24 function PMA_strlen($string)
26 return strlen($string);
29 /**
30 * Returns substring from string, works depending on current charset.
32 * @param string $string string to count
33 * @param int $start start of substring
34 * @param int $length length of substring
35 * @return string
37 function PMA_substr($string, $start, $length = 2147483647)
39 return substr($string, $start, $length);
42 /**
43 * Returns postion of $needle in $haystack or false if not found
45 * @param string $haystack
46 * @param string $needle
47 * @param int $offset
48 * @return integer position of $needle in $haystack or false
50 function PMA_strpos($haystack, $needle, $offset = 0)
52 return strpos($haystack, $needle, $offset);
55 /**
56 * Make a string lowercase
58 * @param string $string
59 * @return string
61 function PMA_strtolower($string)
63 return strtolower($string);