LibreOffice Module sc (master)  1
Static Public Member Functions | List of all members
ScStringUtil Class Reference

#include <stringutil.hxx>

Static Public Member Functions

static bool parseSimpleNumber (const OUString &rStr, sal_Unicode dsep, sal_Unicode gsep, sal_Unicode dsepa, double &rVal)
 Check if a given string is a simple decimal number (e.g. More...
static bool parseSimpleNumber (const char *p, size_t n, char dsep, char gsep, double &rVal)
static OUString SC_DLLPUBLIC GetQuotedToken (const OUString &rIn, sal_Int32 nToken, const OUString &rQuotedPairs, sal_Unicode cTok, sal_Int32 &rIndex)
static bool SC_DLLPUBLIC isMultiline (const OUString &rStr)
static ScInputStringType parseInputString (SvNumberFormatter &rFormatter, const OUString &rStr, LanguageType eLang)

Detailed Description

Definition at line 129 of file stringutil.hxx.

Member Function Documentation

OUString ScStringUtil::GetQuotedToken ( const OUString &  rIn,
sal_Int32  nToken,
const OUString &  rQuotedPairs,
sal_Unicode  cTok,
sal_Int32 &  rIndex 

Definition at line 349 of file stringutil.cxx.

References assert(), and i.

Referenced by XclImpWebQuery::ReadWqtables().

bool ScStringUtil::isMultiline ( const OUString &  rStr)
ScInputStringType ScStringUtil::parseInputString ( SvNumberFormatter rFormatter,
const OUString &  rStr,
LanguageType  eLang 
bool ScStringUtil::parseSimpleNumber ( const OUString &  rStr,
sal_Unicode  dsep,
sal_Unicode  gsep,
sal_Unicode  dsepa,
double &  rVal 

Check if a given string is a simple decimal number (e.g.

12.345). We don't do any elaborate parsing here; we only check for the simplest case of decimal number format.

Note that preceding and trailing spaces are ignored during parsing.

rStrstring to parse
dsepdecimal separator
gsepgroup separator (aka thousands separator)
dsepadecimal separator alternative, usually 0
rValvalue of successfully parsed number
true if the string is a valid number, false otherwise.

Definition at line 52 of file stringutil.cxx.

References aBuf, i, n, and p.

Referenced by ScColumn::ParseString().

bool ScStringUtil::parseSimpleNumber ( const char *  p,
size_t  n,
char  dsep,
char  gsep,
double &  rVal 

Definition at line 203 of file stringutil.cxx.

References aBuf, and i.

The documentation for this class was generated from the following files: