ff7tk  1.0.0.16
Work with Final Fantasy 7 game data
Public Member Functions | List of all members
FF7String Class Reference

The FF7String is a container class for FF7Text. Internally it stores the raw data and if the text is encoded in japanese. More...

#include <FF7String.h>

Public Member Functions

 FF7String (QByteArrayView data=QByteArrayView())
 FF7String Constructs a FF7String with raw data. More...
 
 FF7String (const QString &text, bool jp=false)
 FF7String Constructs a FF7String using a String. More...
 
const QByteArray & data () const
 data Access the data stored in the FF7String More...
 
QString text () const
 text More...
 
void setText (const QString &text, bool jp=false)
 setText sets the Text of the FF7String More...
 
bool contains (const QRegularExpression &regExp) const
 contains Check the text for a regular expression More...
 
qsizetype indexOf (const QRegularExpression &regExp, qsizetype from, qsizetype &size) const
 indexOf Check the text for the location of a regular expression More...
 
qsizetype lastIndexOf (const QRegularExpression &regExp, qsizetype &from, qsizetype &size) const
 lastIndexOf Check the text for the last location of a regular expression More...
 
bool operator== (const FF7String &t2) const
 
bool operator!= (const FF7String &t2) const
 
bool isJapanese () const
 isJapanese check internal encoding of the text More...
 
void setJapanese (bool inJapanese)
 setJapanese Sets the intenal encoding of the text. More...
 

Detailed Description

The FF7String is a container class for FF7Text. Internally it stores the raw data and if the text is encoded in japanese.

Constructor & Destructor Documentation

◆ FF7String() [1/2]

FF7String::FF7String ( QByteArrayView  data = QByteArrayView())
explicit

FF7String Constructs a FF7String with raw data.

Parameters
dataString in FF7Text Format. Will initialize to the language that the FF7Text singleton is using when the string is created
See also
setJapanese

◆ FF7String() [2/2]

FF7String::FF7String ( const QString &  text,
bool  jp = false 
)

FF7String Constructs a FF7String using a String.

Parameters
text- Input String
jp- True if input is japanese.

Member Function Documentation

◆ contains()

bool FF7String::contains ( const QRegularExpression &  regExp) const

contains Check the text for a regular expression

Parameters
regExpThe expression to check
Returns
True if there was a match

◆ data()

const QByteArray & FF7String::data ( ) const

data Access the data stored in the FF7String

Returns
raw data stored

◆ indexOf()

qsizetype FF7String::indexOf ( const QRegularExpression &  regExp,
qsizetype  from,
qsizetype &  size 
) const

indexOf Check the text for the location of a regular expression

Parameters
regExp- The expression to check
from- Starting point of the search
size- Size of the area to search
Returns
the index

◆ isJapanese()

bool FF7String::isJapanese ( ) const
inline

isJapanese check internal encoding of the text

Returns
True if encoded in japanese

◆ lastIndexOf()

qsizetype FF7String::lastIndexOf ( const QRegularExpression &  regExp,
qsizetype &  from,
qsizetype &  size 
) const

lastIndexOf Check the text for the last location of a regular expression

Parameters
regExp- The expression to check
from- Starting point of the search
size- Size of the area to search
Returns
the index

◆ operator!=()

bool FF7String::operator!= ( const FF7String t2) const
inline

◆ operator==()

bool FF7String::operator== ( const FF7String t2) const
inline

◆ setJapanese()

void FF7String::setJapanese ( bool  inJapanese)

setJapanese Sets the intenal encoding of the text.

Parameters
inJapanese- Set to True when the internal string is in japanese.

◆ setText()

void FF7String::setText ( const QString &  text,
bool  jp = false 
)

setText sets the Text of the FF7String

Parameters
text- New Text of the string
jp- True if input is japanese

◆ text()

QString FF7String::text ( ) const

text

Returns
The Decoded FF7Text

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