class PHPExcel_Calculation_TextData

PHPExcelCalculationTextData

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

Methods

static int
CHARACTER(string $character)

CHARACTER

static string
TRIMNONPRINTABLE(mixed $stringValue = '')

TRIMNONPRINTABLE

static string
TRIMSPACES(mixed $stringValue = '')

TRIMSPACES

static int
ASCIICODE(string $characters)

ASCIICODE

static string
CONCATENATE()

CONCATENATE

static string
DOLLAR(float $value, int $decimals = 2)

DOLLAR

static string
SEARCHSENSITIVE(string $needle, string $haystack, int $offset = 1)

SEARCHSENSITIVE

static string
SEARCHINSENSITIVE(string $needle, string $haystack, int $offset = 1)

SEARCHINSENSITIVE

static boolean
FIXEDFORMAT(mixed $value, integer $decimals = 2, boolean $no_commas = false)

FIXEDFORMAT

static string
LEFT(string $value = '', int $chars = 1)

LEFT

static string
MID(string $value = '', int $start = 1, int $chars = null)

MID

static string
RIGHT(string $value = '', int $chars = 1)

RIGHT

static string
STRINGLENGTH(string $value = '')

STRINGLENGTH

static string
LOWERCASE(string $mixedCaseString)

LOWERCASE

static string
UPPERCASE(string $mixedCaseString)

UPPERCASE

static string
PROPERCASE(string $mixedCaseString)

PROPERCASE

static string
REPLACE(string $oldText = '', int $start = 1, int $chars = null, string $newText)

REPLACE

static string
SUBSTITUTE(string $text = '', string $fromText = '', string $toText = '', integer $instance)

SUBSTITUTE

static boolean
RETURNSTRING(mixed $testValue = '')

RETURNSTRING

static boolean
TEXTFORMAT(mixed $value, string $format)

TEXTFORMAT

static boolean
VALUE(mixed $value = '')

VALUE

Details

at line 88
static int CHARACTER(string $character)

CHARACTER

Parameters

string $character Value

Return Value

int

at line 110
static string TRIMNONPRINTABLE(mixed $stringValue = '')

TRIMNONPRINTABLE

Parameters

mixed $stringValue Value to check

Return Value

string

at line 135
static string TRIMSPACES(mixed $stringValue = '')

TRIMSPACES

Parameters

mixed $stringValue Value to check

Return Value

string

at line 155
static int ASCIICODE(string $characters)

ASCIICODE

Parameters

string $characters Value

Return Value

int

at line 189
static string CONCATENATE()

CONCATENATE

Return Value

string

at line 222
static string DOLLAR(float $value, int $decimals = 2)

DOLLAR

This function converts a number to text using currency format, with the decimals rounded to the specified place. The format used is $#,##0.00_);($#,##0.00)..

Parameters

float $value The value to format
int $decimals The number of digits to display to the right of the decimal point. If decimals is negative, number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2

Return Value

string

at line 257
static string SEARCHSENSITIVE(string $needle, string $haystack, int $offset = 1)

SEARCHSENSITIVE

Parameters

string $needle The string to look for
string $haystack The string in which to look
int $offset Offset within $haystack

Return Value

string

at line 294
static string SEARCHINSENSITIVE(string $needle, string $haystack, int $offset = 1)

SEARCHINSENSITIVE

Parameters

string $needle The string to look for
string $haystack The string in which to look
int $offset Offset within $haystack

Return Value

string

at line 331
static boolean FIXEDFORMAT(mixed $value, integer $decimals = 2, boolean $no_commas = false)

FIXEDFORMAT

Parameters

mixed $value Value to check
integer $decimals
boolean $no_commas

Return Value

boolean

at line 362
static string LEFT(string $value = '', int $chars = 1)

LEFT

Parameters

string $value Value
int $chars Number of characters

Return Value

string

at line 391
static string MID(string $value = '', int $start = 1, int $chars = null)

MID

Parameters

string $value Value
int $start Start character
int $chars Number of characters

Return Value

string

at line 420
static string RIGHT(string $value = '', int $chars = 1)

RIGHT

Parameters

string $value Value
int $chars Number of characters

Return Value

string

at line 447
static string STRINGLENGTH(string $value = '')

STRINGLENGTH

Parameters

string $value Value

Return Value

string

at line 471
static string LOWERCASE(string $mixedCaseString)

LOWERCASE

Converts a string value to upper case.

Parameters

string $mixedCaseString

Return Value

string

at line 491
static string UPPERCASE(string $mixedCaseString)

UPPERCASE

Converts a string value to upper case.

Parameters

string $mixedCaseString

Return Value

string

at line 511
static string PROPERCASE(string $mixedCaseString)

PROPERCASE

Converts a string value to upper case.

Parameters

string $mixedCaseString

Return Value

string

at line 532
static string REPLACE(string $oldText = '', int $start = 1, int $chars = null, string $newText)

REPLACE

Parameters

string $oldText String to modify
int $start Start character
int $chars Number of characters
string $newText String to replace in defined position

Return Value

string

at line 555
static string SUBSTITUTE(string $text = '', string $fromText = '', string $toText = '', integer $instance)

SUBSTITUTE

Parameters

string $text Value
string $fromText From Value
string $toText To Value
integer $instance Instance Number

Return Value

string

at line 600
static boolean RETURNSTRING(mixed $testValue = '')

RETURNSTRING

Parameters

mixed $testValue Value to check

Return Value

boolean

at line 618
static boolean TEXTFORMAT(mixed $value, string $format)

TEXTFORMAT

Parameters

mixed $value Value to check
string $format Format mask to use

Return Value

boolean

at line 636
static boolean VALUE(mixed $value = '')

VALUE

Parameters

mixed $value Value to check

Return Value

boolean