Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::StringFormatter Class Reference

StringFormatter object. More...

Inheritance diagram for gem::StringFormatter:
Collaboration diagram for gem::StringFormatter:

Public Member Functions

 StringFormatter (const StringFormatter &)=delete
 StringFormatter (StringFormatter &&stringformatter)=default
 Default move constructor noexcept is deduced.
StringFormatter & operator= (const StringFormatter &)=delete
StringFormatter & operator= (StringFormatter &&stringformatter)=default
 Default move assignment noexcept is deduced.
String getLatitudeAsText (double value, const ECoordinateFormatType coordType=ctDecimal) const noexcept
 Get the latitude as text as decimal, DMS or DDM.
String getLongitudeAsText (double value, const ECoordinateFormatType coordType=ctDecimal) const noexcept
 Get the longitude as text as decimal, DMS or DDM.
String getCoordinateAsText (double value, const ECoordinateFormatType type) const noexcept
 Get the coordinates as text as decimal, DMS or DDM.
String formatPhoneNumber (const String &phone, bool useInternational=true) const noexcept
 Format the phone number into local or international format.
String encodeUrl (const String &src) const noexcept
 Encode Url string.
String decodeUrl (const String &src) const noexcept
 Decode Url string.
String generateUUID () const noexcept
 Generate UUID.
bool validateUUID (const String &uuid) const noexcept
 Validate UUID.

Detailed Description

StringFormatter object.

Implements share read/write Api object over IStringFormatter.

This behaves like a singleton, i.e. all instances are sharing behind the same API interface

Constructor & Destructor Documentation

◆ StringFormatter()

gem::StringFormatter::StringFormatter ( StringFormatter && stringformatter)
default

Default move constructor noexcept is deduced.

Parameters
stringformatterThe source object

Member Function Documentation

◆ decodeUrl()

String gem::StringFormatter::decodeUrl ( const String & src) const
inlinenoexcept

Decode Url string.

Parameters
srcThe source string
Returns
The decoded string

◆ encodeUrl()

String gem::StringFormatter::encodeUrl ( const String & src) const
inlinenoexcept

Encode Url string.

Parameters
srcThe source string
Returns
The encoded string

◆ formatPhoneNumber()

String gem::StringFormatter::formatPhoneNumber ( const String & phone,
bool useInternational = true ) const
inlinenoexcept

Format the phone number into local or international format.

International phone number format may be used to make also local calls in all countries except USA and Canada; here the flag should be false.

Parameters
phoneThe phone number
useInternationalThe international flag
Returns
The formatted phone number

◆ generateUUID()

String gem::StringFormatter::generateUUID ( ) const
inlinenoexcept

Generate UUID.

Returns
The uuid as string

◆ getCoordinateAsText()

String gem::StringFormatter::getCoordinateAsText ( double value,
const ECoordinateFormatType type ) const
inlinenoexcept

Get the coordinates as text as decimal, DMS or DDM.

Parameters
valueThe coordinate value
typeThe coordinate format type
Returns
The coordinate as text

◆ getLatitudeAsText()

String gem::StringFormatter::getLatitudeAsText ( double value,
const ECoordinateFormatType coordType = ctDecimal ) const
inlinenoexcept

Get the latitude as text as decimal, DMS or DDM.

Parameters
valueThe latitude value
coordTypeThe coordinate format type
Returns
The latitude as text

◆ getLongitudeAsText()

String gem::StringFormatter::getLongitudeAsText ( double value,
const ECoordinateFormatType coordType = ctDecimal ) const
inlinenoexcept

Get the longitude as text as decimal, DMS or DDM.

Parameters
valueThe longitude value
coordTypeThe coordinate format type
Returns
The longitude as text

◆ operator=()

StringFormatter & gem::StringFormatter::operator= ( StringFormatter && stringformatter)
default

Default move assignment noexcept is deduced.

Parameters
stringformatterThe source object
Returns
The target object

◆ validateUUID()

bool gem::StringFormatter::validateUUID ( const String & uuid) const
inlinenoexcept

Validate UUID.

Parameters
uuidThe uuid string to validate.
Returns
true if valid, false if not