Update CellHelper.php

New function, try to identify a formula string
This commit is contained in:
Stephen Sweetland 2017-05-25 11:06:32 +01:00 committed by GitHub
parent 99816b0b8e
commit 1d38fca715

View File

@ -64,6 +64,17 @@ class CellHelper
return (gettype($value) === 'string' && $value !== ''); return (gettype($value) === 'string' && $value !== '');
} }
/**
* Returns whether the given value looks like a formula
*
* @param $value
* @return bool whether the given value looks like a formula
*/
public static function isFormulaString($value)
{
return (strpos($value,'=') === 0);
}
/** /**
* Returns whether the given value is numeric. * Returns whether the given value is numeric.
* A numeric value is from type "integer" or "double" ("float" is not returned by gettype). * A numeric value is from type "integer" or "double" ("float" is not returned by gettype).