STRING_REGEXP_FRACTION
STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)'
PHPExcel_Shared_String
Copyright (c) 2006 - 2015 PHPExcel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ControlCharacterOOXML2PHP(string $value = '') : string
Convert from OpenXML escaped control character to PHP control character
That's correct, control characters are stored directly in the shared-strings table.
We do encode characters that cannot be represented in XML using the following escape sequence:
xHHHH where H represents a hexadecimal character in the character's value...
So you could end up with something like x0008 in a string (either in a cell value (
string | $value | Value to unescape |
ControlCharacterPHP2OOXML(string $value = '') : string
Convert from PHP control character to OpenXML escaped control character
That's correct, control characters are stored directly in the shared-strings table.
We do encode characters that cannot be represented in XML using the following escape sequence:
xHHHH where H represents a hexadecimal character in the character's value...
So you could end up with something like x0008 in a string (either in a cell value (
string | $value | Value to escape |
UTF8toBIFF8UnicodeShort(string $value, array<mixed,mixed> $arrcRuns = array()) : string
Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3
string | $value | UTF-8 encoded string |
array<mixed,mixed> | $arrcRuns | Details of rich text runs in $value |
UTF8toBIFF8UnicodeLong(string $value) : string
Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3
string | $value | UTF-8 encoded string |
ConvertEncoding(string $value, string $to, string $from) : string
Convert string from one encoding to another. First try mbstring, then iconv, finally strlen
string | $value | |
string | $to | Encoding to convert to, e.g. 'UTF-8' |
string | $from | Encoding to convert from, e.g. 'UTF-16LE' |
utf16_decode(string $str, $bom_be = true) : string
Decode UTF-16 encoded strings.
Can handle both BOM'ed data and un-BOM'ed data. Assumes Big-Endian byte order if no BOM is available. This function was taken from http://php.net/manual/en/function.utf8-decode.php and $bom_be parameter added.
string | $str | UTF-16 encoded data to decode. |
$bom_be |
UTF-8 / ISO encoded data.
Substring(string $pValue = '', integer $pStart, integer $pLength) : string
Get a substring of a UTF-8 encoded string. First try mbstring, then iconv, finally strlen
string | $pValue | UTF-8 encoded string |
integer | $pStart | Start offset |
integer | $pLength | Maximum number of characters in substring |
testStringAsNumeric(string $value) : mixed
Retrieve any leading numeric part of a string, or return the full string if no leading numeric (handles basic integer or float, but not exponent or non decimal)
string | $value |
string or only the leading numeric part of the string