ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Static Public Member Functions | |
static | getIsMbstringEnabled () |
Get whether mbstring extension is available. More... | |
static | getIsIconvEnabled () |
Get whether iconv extension is available. More... | |
static | buildCharacterSets () |
static | ControlCharacterOOXML2PHP ($value='') |
Convert from OpenXML escaped control character to PHP control character. More... | |
static | ControlCharacterPHP2OOXML ($value='') |
Convert from PHP control character to OpenXML escaped control character. More... | |
static | SanitizeUTF8 ($value) |
Try to sanitize UTF8, stripping invalid byte sequences. More... | |
static | IsUTF8 ($value='') |
Check if a string contains UTF8 data. More... | |
static | FormatNumber ($value) |
Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English. More... | |
static | UTF8toBIFF8UnicodeShort ($value, $arrcRuns=array()) |
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. More... | |
static | UTF8toBIFF8UnicodeLong ($value) |
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. More... | |
static | ConvertEncoding ($value, $to, $from) |
Convert string from one encoding to another. More... | |
static | utf16_decode ($str, $bom_be=TRUE) |
Decode UTF-16 encoded strings. More... | |
static | CountCharacters ($value, $enc='UTF-8') |
Get character count. More... | |
static | Substring ($pValue='', $pStart=0, $pLength=0) |
Get a substring of a UTF-8 encoded string. More... | |
static | StrToUpper ($pValue='') |
Convert a UTF-8 encoded string to upper case. More... | |
static | StrToLower ($pValue='') |
Convert a UTF-8 encoded string to lower case. More... | |
static | StrToTitle ($pValue='') |
Convert a UTF-8 encoded string to title/proper case (uppercase every first character in each word, lower case all other characters) More... | |
static | mb_is_upper ($char) |
static | mb_str_split ($string) |
static | StrCaseReverse ($pValue='') |
Reverse the case of a string, so that all uppercase characters become lowercase and all lowercase characters become uppercase. More... | |
static | convertToNumberIfFraction (&$operand) |
Identify whether a string contains a fractional numeric value, and convert it to a numeric if it is. More... | |
static | getDecimalSeparator () |
Get the decimal separator. More... | |
static | setDecimalSeparator ($pValue='.') |
Set the decimal separator. More... | |
static | getThousandsSeparator () |
Get the thousands separator. More... | |
static | setThousandsSeparator ($pValue=',') |
Set the thousands separator. More... | |
static | getCurrencyCode () |
Get the currency code. More... | |
static | setCurrencyCode ($pValue='$') |
Set the currency code. More... | |
static | SYLKtoUTF8 ($pValue='') |
Convert SYLK encoded string to UTF-8. More... | |
static | testStringAsNumeric ($value) |
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) More... | |
Data Fields | |
const | STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)' |
Constants. More... | |
Static Private Member Functions | |
static | _buildControlCharacters () |
Build control characters array. More... | |
static | _buildSYLKCharacters () |
Build SYLK characters array. More... | |
Static Private Attributes | |
static | $_controlCharacters = array() |
static | $_SYLKCharacters = array() |
SYLK Characters array. More... | |
static | $_decimalSeparator |
static | $_thousandsSeparator |
static | $_currencyCode |
static | $_isMbstringEnabled |
static | $_isIconvEnabled |
Definition at line 36 of file String.php.
|
staticprivate |
Build control characters array.
Definition at line 96 of file String.php.
|
staticprivate |
|
static |
Definition at line 332 of file String.php.
|
static |
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 (<v>) element or in the shared string <t> element.
string | $value | Value to unescape |
Definition at line 355 of file String.php.
Referenced by PHPExcel_Reader_Excel2007\_parseRichText(), and PHPExcel_Reader_Excel2007\load().
|
static |
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 (<v>) element or in the shared string <t> element.
string | $value | Value to escape |
Definition at line 373 of file String.php.
Referenced by PHPExcel_Writer_Excel2007_Chart\_writeCatAx(), PHPExcel_Writer_Excel2007_Worksheet\_writeCell(), PHPExcel_Writer_Excel2007_Chart\_writeValAx(), PHPExcel_Writer_Excel2007_StringTable\writeRichText(), PHPExcel_Writer_Excel2007_StringTable\writeRichTextForCharts(), and PHPExcel_Writer_Excel2007_StringTable\writeStringTable().
|
static |
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' |
Definition at line 493 of file String.php.
Referenced by PHPExcel_Reader_Excel2003XML\_convertStringEncoding(), PHPExcel_Reader_Excel5\_decodeCodepage(), PHPExcel_Reader_Excel5\_encodeUTF16(), PHPExcel_Reader_Excel5\_readDocumentSummaryInformation(), PHPExcel_Reader_Excel5\_readSummaryInformation(), PHPExcel_Writer_Excel5_Worksheet\_writeUrlInternal(), and PHPExcel_Reader_CSV\loadIntoExisting().
|
static |
Identify whether a string contains a fractional numeric value, and convert it to a numeric if it is.
string | &$operand | string value to test |
Definition at line 671 of file String.php.
References PHPExcel_Calculation\getInstance().
Referenced by PHPExcel_Calculation\_validateBinaryOperand(), PHPExcel_Shared_JAMA_Matrix\arrayRightDivide(), PHPExcel_Shared_JAMA_Matrix\arrayTimesEquals(), PHPExcel_Shared_JAMA_Matrix\minusEquals(), PHPExcel_Shared_JAMA_Matrix\plusEquals(), and PHPExcel_Shared_JAMA_Matrix\power().
|
static |
Get character count.
First try mbstring, then iconv, finally strlen
string | $value | |
string | $enc | Encoding |
Definition at line 550 of file String.php.
Referenced by PHPExcel_Worksheet\_checkSheetCodeName(), PHPExcel_Worksheet\_checkSheetTitle(), PHPExcel_Reader_Excel5\_readLabelSst(), PHPExcel_Writer_Excel5_Worksheet\_writeUrlInternal(), PHPExcel_Writer_Excel5_Worksheet\close(), PHPExcel_Shared_Font\getTextWidthPixelsApprox(), PHPExcel_Calculation_TextData\SEARCHINSENSITIVE(), PHPExcel_Calculation_TextData\SEARCHSENSITIVE(), PHPExcel_Worksheet\setCodeName(), and PHPExcel_Worksheet\setTitle().
|
static |
Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English.
mixed | $value |
Definition at line 416 of file String.php.
Referenced by PHPExcel_Writer_HTML\_setMargins(), PHPExcel_Writer_Excel2007_Worksheet\_writeCell(), PHPExcel_Writer_Excel2007_Worksheet\_writeCols(), PHPExcel_Writer_Excel2007_Worksheet\_writePageMargins(), PHPExcel_Writer_Excel2007_Worksheet\_writeSheetData(), and PHPExcel_Writer_Excel2007_Worksheet\_writeSheetFormatPr().
|
static |
Get the currency code.
If it has not yet been set explicitly, try to obtain the symbol information from locale.
Definition at line 751 of file String.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), PHPExcel_Style_NumberFormat\toFormattedString(), and PHPExcel_Calculation_TextData\VALUE().
|
static |
Get the decimal separator.
If it has not yet been set explicitly, try to obtain number formatting information from locale.
Definition at line 687 of file String.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), and PHPExcel_Style_NumberFormat\toFormattedString().
|
static |
Get whether iconv extension is available.
Definition at line 293 of file String.php.
References defined.
|
static |
Get whether mbstring extension is available.
Definition at line 276 of file String.php.
|
static |
Get the thousands separator.
If it has not yet been set explicitly, try to obtain number formatting information from locale.
Definition at line 719 of file String.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), PHPExcel_Style_NumberFormat\toFormattedString(), and PHPExcel_Calculation_TextData\VALUE().
|
static |
Check if a string contains UTF8 data.
string | $value |
Definition at line 405 of file String.php.
|
static |
Definition at line 629 of file String.php.
|
static |
Definition at line 634 of file String.php.
|
static |
Try to sanitize UTF8, stripping invalid byte sequences.
Not perfect. Does not surrogate characters.
string | $value |
Definition at line 383 of file String.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), and PHPExcel_Cell_DefaultValueBinder\bindValue().
|
static |
Set the currency code.
Only used by PHPExcel_Style_NumberFormat::toFormattedString() to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF
string | $pValue | Character for currency code |
Definition at line 772 of file String.php.
Referenced by AdvancedValueBinderTest\testCurrency().
|
static |
Set the decimal separator.
Only used by PHPExcel_Style_NumberFormat::toFormattedString() to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF
string | $pValue | Character for decimal separator |
Definition at line 708 of file String.php.
Referenced by NumberFormatTest\setUp(), and AdvancedValueBinderTest\testCurrency().
|
static |
Set the thousands separator.
Only used by PHPExcel_Style_NumberFormat::toFormattedString() to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF
string | $pValue | Character for thousands separator |
Definition at line 740 of file String.php.
Referenced by NumberFormatTest\setUp(), and AdvancedValueBinderTest\testCurrency().
|
static |
Reverse the case of a string, so that all uppercase characters become lowercase and all lowercase characters become uppercase.
string | $pValue | UTF-8 encoded string |
Definition at line 648 of file String.php.
Referenced by PHPExcel_Calculation\strcmpLowercaseFirst().
|
static |
Convert a UTF-8 encoded string to lower case.
string | $pValue | UTF-8 encoded string |
Definition at line 606 of file String.php.
Referenced by PHPExcel_Calculation_TextData\LOWERCASE().
|
static |
Convert a UTF-8 encoded string to title/proper case (uppercase every first character in each word, lower case all other characters)
string | $pValue | UTF-8 encoded string |
Definition at line 621 of file String.php.
Referenced by PHPExcel_Calculation_TextData\PROPERCASE().
|
static |
Convert a UTF-8 encoded string to upper case.
string | $pValue | UTF-8 encoded string |
Definition at line 592 of file String.php.
Referenced by PHPExcel_Calculation_TextData\UPPERCASE().
|
static |
Get a substring of a UTF-8 encoded string.
First try mbstring, then iconv, finally strlen
string | $pValue | UTF-8 encoded string |
int | $pStart | Start offset |
int | $pLength | Maximum number of characters in substring |
Definition at line 572 of file String.php.
Referenced by PHPExcel_Worksheet\_checkSheetCodeName(), PHPExcel_Reader_Excel5\_readLabelSst(), PHPExcel_Cell_DataType\checkString(), PHPExcel_Worksheet\setCodeName(), and PHPExcel_Worksheet\setTitle().
|
static |
Convert SYLK encoded string to UTF-8.
string | $pValue |
Definition at line 783 of file String.php.
Referenced by PHPExcel_Reader_SYLK\listWorksheetInfo(), and PHPExcel_Reader_SYLK\loadIntoExisting().
|
static |
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 |
Definition at line 804 of file String.php.
Referenced by PHPExcel_Calculation_DateTime\DATE().
|
static |
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. |
Definition at line 527 of file String.php.
|
static |
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 |
Definition at line 469 of file String.php.
References $data.
Referenced by PHPExcel_Writer_Excel5_Worksheet\_writeCFRule(), PHPExcel_Writer_Excel5_Worksheet\_writeDataValidity(), PHPExcel_Writer_Excel5_Worksheet\_writeFooter(), PHPExcel_Writer_Excel5_Worksheet\_writeHeader(), PHPExcel_Writer_Excel5_Worksheet\_writeLabelSst(), PHPExcel_Writer_Excel5_Worksheet\_writeRangeProtection(), and PHPExcel_Writer_Excel5_Worksheet\_writeStringRecord().
|
static |
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 |
mixed[] | $arrcRuns Details of rich text runs in $value |
Definition at line 434 of file String.php.
References $data.
Referenced by PHPExcel_Writer_Excel5_Workbook\_calcSheetOffsets(), PHPExcel_Writer_Excel5_Parser\_convertString(), PHPExcel_Writer_Excel5_Worksheet\_writeRichTextString(), and PHPExcel_Writer_Excel5_Font\writeFont().
|
staticprivate |
Definition at line 49 of file String.php.
|
staticprivate |
Definition at line 77 of file String.php.
|
staticprivate |
Definition at line 63 of file String.php.
|
staticprivate |
Definition at line 91 of file String.php.
|
staticprivate |
Definition at line 84 of file String.php.
|
staticprivate |
|
staticprivate |
Definition at line 70 of file String.php.
const PHPExcel_Shared_String::STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)' |