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, bool bDetectScientificNumber=true)
 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 (std::u16string_view rStr)
static ScInputStringType parseInputString (SvNumberFormatter &rFormatter, const OUString &rStr, LanguageType eLang)

Detailed Description

Definition at line 131 of file stringutil.hxx.

Member Function Documentation

◆ GetQuotedToken()

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

Definition at line 350 of file stringutil.cxx.

References i, and nToken.

Referenced by XclImpWebQuery::ReadWqtables().

◆ isMultiline()

bool ScStringUtil::isMultiline ( std::u16string_view  rStr)

◆ parseInputString()

ScInputStringType ScStringUtil::parseInputString ( SvNumberFormatter rFormatter,
const OUString &  rStr,
LanguageType  eLang 

◆ parseSimpleNumber() [1/2]

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

Definition at line 205 of file stringutil.cxx.

References aBuf, i, n, and p.

◆ parseSimpleNumber() [2/2]

bool ScStringUtil::parseSimpleNumber ( const OUString &  rStr,
sal_Unicode  dsep,
sal_Unicode  gsep,
sal_Unicode  dsepa,
double &  rVal,
bool  bDetectScientificNumber = true 

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 55 of file stringutil.cxx.

References aBuf, i, n, and p.

Referenced by ScColumn::ParseString().

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