Update Locale Kit docs.
Add \since to each method. This was pretty easy to figure out since the whole kit exists only in Haiku.
This commit is contained in:
@@ -72,6 +72,8 @@
|
||||
Note that french(France) will failback to french, but then directly to the
|
||||
language in the source code. This avoids mixing 3 or more languages in the
|
||||
same application if the catalogs are incomplete and avoids confusion.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -80,6 +82,8 @@
|
||||
\brief Construct an empty BCatalog object.
|
||||
|
||||
Should be followed by SetTo() method to set the catalog.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -101,16 +105,20 @@
|
||||
|
||||
\param catalogOwner entry_ref for which to load a catalog.
|
||||
\param language The language of the catalog to load. If \c NULL, the user
|
||||
settings will be used.
|
||||
settings will be used.
|
||||
\param fingerprint The fingerprint version-info for the catalog to load.
|
||||
If \c 0, the fingerprint will not be checked,and any version of the
|
||||
catalog will be loaded.
|
||||
If \c 0, the fingerprint will not be checked,and any version of the
|
||||
catalog will be loaded.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BCatalog::~BCatalog()
|
||||
\brief Destroys the BCatalog object freeing memory used by it.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -119,9 +127,9 @@
|
||||
const char* context, const char* comment)
|
||||
\brief Get a string from the catalog.
|
||||
|
||||
This method access the data of the catalog and reeturns you the translated
|
||||
This method access the data of the catalog and returns you the translated
|
||||
version of the string. You must pass it the context where the string is, as
|
||||
the same string may appear somewhere else and need a differnet translation.
|
||||
the same string may appear somewhere else and need a different translation.
|
||||
The comment is optional. It is meant as an help to translators, when the
|
||||
string alone is not helpful enough or there are special things to note.
|
||||
The comment is also used as a way to uniquely identify a string, so if two
|
||||
@@ -133,7 +141,9 @@
|
||||
\param comment Supplementary comment for translators.
|
||||
|
||||
\returns The translated string, or the one passed as a parameter if no
|
||||
translation was found.
|
||||
translation was found.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -152,6 +162,8 @@
|
||||
\param id The identifier of the string.
|
||||
|
||||
\returns The translated string if found, or an empty string.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -173,7 +185,9 @@
|
||||
\retval B_ERROR Unable to get an exclusive lock on data.
|
||||
\retval B_NO_INIT Catalog is \c NULL.
|
||||
\retval B_NAME_NOT_FOUND catalog with the specified \a name could not be
|
||||
found.
|
||||
found.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -187,6 +201,8 @@
|
||||
Note the current catalog format doesn't allow storing custom data in
|
||||
catalogs, so the only way to use this method is providing your own
|
||||
catalog add-on for storing the data.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -200,6 +216,8 @@
|
||||
\param sig The string where to copy the signature.
|
||||
|
||||
\returns An error code.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -216,6 +234,8 @@
|
||||
\retval B_ERROR Could not get exclusive lock on catalog.
|
||||
\retval B_BAD_VALUE \a lang is \c NULL.
|
||||
\retval B_NO_INIT Catalog data is \c NULL.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -233,6 +253,8 @@
|
||||
\retval B_ERROR Could not get exclusive lock on catalog.
|
||||
\retval B_BAD_VALUE \a fp is \c NULL.
|
||||
\retval B_NO_INIT Catalog data is \c NULL.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -245,10 +267,12 @@
|
||||
|
||||
\param catalogOwner The \c entry_ref of the catalog that you want to load.
|
||||
\param language The language of the catalog to load. If \c NULL, the user
|
||||
settings will be used.
|
||||
settings will be used.
|
||||
\param fingerprint The fingerprint of the catalog you want to load.
|
||||
|
||||
\returns A status code, \c B_OK on success, \c B_ERROR on error.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -260,6 +284,8 @@
|
||||
\retval B_OK The catalog is initialized properly.
|
||||
\retval B_ERROR Could not get exclusive lock on catalog.
|
||||
\retval B_NO_INIT Catalog data is \c NULL.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -268,4 +294,6 @@
|
||||
\brief Gets the number of items in the catalog.
|
||||
|
||||
\returns the number of strings in the catalog or 0 on error.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
sorting.
|
||||
|
||||
\warning This class is not multithread-safe, as Compare() change the
|
||||
ICUCollator (the strength). So if you want to use a BCollator from
|
||||
more than one thread you need to protect it with a lock.
|
||||
ICUCollator (the strength). So if you want to use a BCollator
|
||||
from more than one thread you need to protect it with a lock.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -46,9 +48,11 @@
|
||||
\brief Construct a collator with the default locale and strength.
|
||||
|
||||
\attention The default collator should be constructed by the BLocale
|
||||
instead since it is aware of the currently defined locale.
|
||||
instead since it is aware of the currently defined locale.
|
||||
|
||||
This constructor uses \c B_COLLATE_PRIMARY strength.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -63,12 +67,14 @@
|
||||
|
||||
\param locale The \a locale to build the constructor for.
|
||||
\param strength The collator class provide four level of \a strength.
|
||||
\li \c B_COLLATE_PRIMARY doesn't differentiate e from é,
|
||||
\li \c B_COLLATE_SECONDARY takes letter accents into account,
|
||||
\li \c B_COLLATE_TERTIARY is case sensitive,
|
||||
\li \c B_COLLATE_QUATERNARY is very strict. Most of the time you
|
||||
shouldn't need to go this far.
|
||||
\li \c B_COLLATE_PRIMARY doesn't differentiate e from é,
|
||||
\li \c B_COLLATE_SECONDARY takes letter accents into account,
|
||||
\li \c B_COLLATE_TERTIARY is case sensitive,
|
||||
\li \c B_COLLATE_QUATERNARY is very strict. Most of the time you
|
||||
shouldn't need to go this far.
|
||||
\param ignorePunctuation Ignore punctuation during sorting.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -77,6 +83,8 @@
|
||||
\brief Unarchive a collator from a message.
|
||||
|
||||
\param archive The message to unarchive the BCollator object from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -87,6 +95,8 @@
|
||||
Copies a BCollator object from another BCollator object.
|
||||
|
||||
\param other The BCollator to copy from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -95,6 +105,8 @@
|
||||
\brief Destructor method.
|
||||
|
||||
Deletes the BCollator object freeing the resources it consumes.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -103,6 +115,8 @@
|
||||
\brief Assignment operator.
|
||||
|
||||
\param other the BCollator object to assign from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -114,11 +128,13 @@
|
||||
when calling other methods.
|
||||
|
||||
\param strength The collator class provide four level of \a strength.
|
||||
\li \c B_COLLATE_PRIMARY doesn't differentiate e from é,
|
||||
\li \c B_COLLATE_SECONDARY takes letter accents into account,
|
||||
\li \c B_COLLATE_TERTIARY is case sensitive,
|
||||
\li \c B_COLLATE_QUATERNARY is very strict. Most of the time you
|
||||
shouldn't need to go this far.
|
||||
\li \c B_COLLATE_PRIMARY doesn't differentiate e from é,
|
||||
\li \c B_COLLATE_SECONDARY takes letter accents into account,
|
||||
\li \c B_COLLATE_TERTIARY is case sensitive,
|
||||
\li \c B_COLLATE_QUATERNARY is very strict. Most of the time you
|
||||
shouldn't need to go this far.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -127,6 +143,8 @@
|
||||
\brief Get the current strength of this catalog.
|
||||
|
||||
\returns The current strength of the catalog.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -136,16 +154,20 @@
|
||||
|
||||
This function enables or disables the handling of punctuation.
|
||||
|
||||
\param ignore Boolean indicating whether or not punctuation should
|
||||
be ignored.
|
||||
\param ignore Whether or not punctuation should be ignored.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn bool BCollator::IgnorePunctuation() const
|
||||
\brief Gets the behavior of the collator with regards to punctuation.
|
||||
|
||||
\returns \c true if the collator will take punctuation into account
|
||||
when sorting, \c false otherwise.
|
||||
when sorting, \c false otherwise.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -166,6 +188,8 @@
|
||||
|
||||
\retval B_OK if everything went well.
|
||||
\retval B_ERROR if an error occurred generating the sortkey.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -182,9 +206,15 @@
|
||||
\param s2 The second string to compare.
|
||||
\param strength The \a strength to use for the string comparison.
|
||||
|
||||
\returns An integer value representing how the strings compare to each
|
||||
other.
|
||||
\retval 0 if the strings are equal.
|
||||
\retval <0 if s1 is less than s2.
|
||||
\retval >0 if s1 is greater than s2.
|
||||
|
||||
\since Haiku R1
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -205,6 +235,8 @@
|
||||
\param strength The \a strength to use for the string comparison.
|
||||
|
||||
\returns \c true if the strings are identical, \c false otherwise.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -221,6 +253,8 @@
|
||||
\param strength The \a strength to use for the string comparison.
|
||||
|
||||
\returns \c true if s1 is greater than, but not equal to, s2.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -236,6 +270,8 @@
|
||||
\param strength The \a strength to use for the string comparison.
|
||||
|
||||
\returns \c true if s1 is greater or equal than s2.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -251,5 +287,7 @@
|
||||
\param archive The message to restore the collator from.
|
||||
|
||||
\returns A pointer to a BArchivable object containing the BCollator or
|
||||
\c NULL if an error occurred restoring the \a archive.
|
||||
\c NULL if an error occurred restoring the \a archive.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
Date, time, and number formatting also depends to some extent on the
|
||||
language used so they are found in the BLocale class instead.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,6 +43,8 @@
|
||||
\brief Initialize a BCountry from a country code.
|
||||
|
||||
\param countryCode The country code to initialize from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,17 +53,27 @@
|
||||
\brief Initialize a BCountry from another BCountry object.
|
||||
|
||||
\param other The BCountry object to initialize from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BCountry& BCountry::operator=(const BCountry& other)
|
||||
\brief Initialize a BCountry from another BCountry object by overloading
|
||||
the = operator.
|
||||
|
||||
\param other The BCountry object to initialize from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BCountry::~BCountry()
|
||||
\brief Destructor method.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -74,6 +88,8 @@
|
||||
|
||||
\returns A status code, B_OK if everything went fine, or an error code
|
||||
otherwise.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -82,6 +98,8 @@
|
||||
\brief Gets the ISO country code for the country.
|
||||
|
||||
\returns The ISO country code for the country.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -98,4 +116,6 @@
|
||||
\param result The BBitmap object to draw the flag into.
|
||||
|
||||
\returns \c B_OK if the drawing was successful.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
BDurationFormat is a formatter for time intervals. A time interval is
|
||||
defined by its start and end values, and the result is a string such as
|
||||
"1 hour, 2 minutes, 28 seconds".
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,9 +39,11 @@
|
||||
\brief Constructor.
|
||||
|
||||
\warning Creating a BDurationFormat is a costly operation. Most of the
|
||||
time want to use the default one through the BLocale class.
|
||||
time want to use the default one through the BLocale class.
|
||||
|
||||
\param separator String appended between the duration elements.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,12 +52,16 @@
|
||||
\brief Copy Constructor.
|
||||
|
||||
\param other The BDurationFormat object to copy from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BDurationFormat::~BDurationFormat()
|
||||
\brief Destructor.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -64,6 +72,8 @@
|
||||
\param other The BDurationFormat object to copy from.
|
||||
|
||||
\returns The resulting BDurationFormat object.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -72,6 +82,8 @@
|
||||
\brief Replace the separator for this formatter.
|
||||
|
||||
\param separator The separator string to set.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -82,6 +94,8 @@
|
||||
\param locale The BLocale object to set.
|
||||
|
||||
\returns A status code, \c B_OK on success or an error code on error.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -95,6 +109,8 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_NO_INIT Format object is \c NULL.
|
||||
\retval B_ERROR Other errors.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -116,4 +132,6 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_BAD_VALUE Buffer was \c NULL.
|
||||
\retval B_ERROR Formatting error.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
+98
-31
@@ -37,6 +37,8 @@
|
||||
BLocale is also the class to use when you want to perform formatting
|
||||
or parsing of dates, times, and numbers, in the natural language of
|
||||
the user.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -44,13 +46,19 @@
|
||||
\fn BLocale::BLocale(const BLanguage* language,
|
||||
const BFormattingConventions* conventions)
|
||||
\brief Initializes a BLocale object corresponding to the passed in
|
||||
\a language and \a conventions.
|
||||
\a language and \a conventions.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocale::BLocale(const BLocale& other)
|
||||
\brief Initializes a BLocale object.
|
||||
\brief Initializes a BLocale object as a copy of \a other.
|
||||
|
||||
\param other The BLocale object to initialize from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -60,17 +68,27 @@
|
||||
|
||||
Returns the collator in use for this locale, allowing you to use it
|
||||
to sort a set of strings.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocale& BLocale::operator=(const BLocale& other)
|
||||
\brief Initializes a BLocale object as a copy of \a other by overloading
|
||||
the = operator.
|
||||
|
||||
\param other The BLocale object to initialize from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocale::~BLocale()
|
||||
\brief Destructor method.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -84,6 +102,8 @@
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE \c NULL \a collator object passed in.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -97,21 +117,26 @@
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE \c NULL \a language object passed in.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocale::GetFormattingConventions(
|
||||
BFormattingConventions* conventions) const
|
||||
\brief Sets \a conventions object to the default formatting conventions
|
||||
for the BLocale.
|
||||
\brief Fills out \a conventions with the default formatting conventions
|
||||
for the BLocale.
|
||||
|
||||
\param conventions A pointer to a BFormattingConventions object to fill out.
|
||||
\param conventions A pointer to a BFormattingConventions object to fill
|
||||
out.
|
||||
|
||||
\returns A status code.
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE \c NULL \a conventions object passed in.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -123,8 +148,10 @@
|
||||
|
||||
\internal Assumes a certain order of the string bases.
|
||||
|
||||
\returns a blank string in the case of an error or the string "UTF-8"
|
||||
if there is \a id is set to \a B_CODESET.
|
||||
\returns A blank string in the case of an error or the string "UTF-8"
|
||||
if there is \a id is set to \a B_CODESET.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -136,6 +163,8 @@
|
||||
If unable to lock the BLocale \a conventions is left untouched.
|
||||
|
||||
\param conventions The formatting convention to set.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -146,6 +175,8 @@
|
||||
If unable to lock the BLocale \a newCollator is left untouched.
|
||||
|
||||
\param newCollator The collator to set.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -156,6 +187,8 @@
|
||||
If unable to lock the BLocale \a newLanguage is left untouched.
|
||||
|
||||
\param newLanguage The code of the language to set to locale to.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -163,13 +196,13 @@
|
||||
\fn ssize_t BLocale::FormatDate(char* string, size_t maxSize, time_t time,
|
||||
BDateFormatStyle style) const
|
||||
\brief Fills in \a string with a formatted date up to \a maxSize bytes for
|
||||
the given \a time and \a style for the locale.
|
||||
the given \a time and \a style for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted date.
|
||||
\param maxSize The size of the buffer.
|
||||
\param time The time (in seconds since epoch) to format
|
||||
\param style Specify the long format (with day name, full
|
||||
month name) or the short format, 08/12/2010 or similar.
|
||||
month name) or the short format, 08/12/2010 or similar.
|
||||
|
||||
\returns The number of bytes written during the date formatting.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
@@ -181,6 +214,8 @@
|
||||
BTimeFormatStyle timeStyle) const
|
||||
\sa BLocale::FormatTime(char* string, size_t maxSize, time_t time,
|
||||
BTimeFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -188,7 +223,7 @@
|
||||
\fn status_t BLocale::FormatDate(BString *string, time_t time,
|
||||
BDateFormatStyle style, const BTimeZone* timeZone) const
|
||||
\brief Fills in \a string with a formatted date for the given
|
||||
\a time, \a style, and \a timeZone for the locale.
|
||||
\a time, \a style, and \a timeZone for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted date.
|
||||
\param time The time (in seconds since epoch) to format
|
||||
@@ -206,6 +241,8 @@
|
||||
const BTimeZone* timeZone) const
|
||||
\sa status_t BLocale::FormatTime(BString* string, time_t time,
|
||||
BTimeFormatStyle style, const BTimeZone* timeZone) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -213,7 +250,7 @@
|
||||
\fn status_t BLocale::FormatDate(BString* string, int*& fieldPositions,
|
||||
int& fieldCount, time_t time, BDateFormatStyle style) const
|
||||
\brief Fills in \a string with a formatted date for the given
|
||||
\a time and \a style for the locale.
|
||||
\a time and \a style for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted date.
|
||||
\param fieldPositions ???
|
||||
@@ -230,6 +267,8 @@
|
||||
|
||||
\sa BLocale::FormatTime(BString* string, int*& fieldPositions,
|
||||
int& fieldCount, time_t time, BTimeFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -247,7 +286,7 @@
|
||||
\param fields Pointer to the fields object.
|
||||
\param fieldCount The number of fields.
|
||||
\param style Specify the long format (with day name, full
|
||||
month name) or the short format, 08/12/2010 or similar.
|
||||
month name) or the short format, 08/12/2010 or similar.
|
||||
|
||||
\returns A status code.
|
||||
\retval B_OK Everything went fine.
|
||||
@@ -257,6 +296,8 @@
|
||||
|
||||
\sa BLocale::GetTimeFields(BDateElement*& fields, int& fieldCount,
|
||||
BTimeFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -277,6 +318,8 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_BAD_VALUE \a startOfWeek is \c NULL.
|
||||
\retval B_ERROR Unable to lock the BLocale or another error occurred.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -285,7 +328,7 @@
|
||||
time_t time, BDateFormatStyle dateStyle,
|
||||
BTimeFormatStyle timeStyle) const
|
||||
\brief Fills in \a string with a formatted datetime up to \a maxSize bytes
|
||||
for the given \a time and \a style for the locale.
|
||||
for the given \a time and \a style for the locale.
|
||||
|
||||
\param target The string buffer to fill with the formatted datetime.
|
||||
\param maxSize The size of the buffer.
|
||||
@@ -302,6 +345,8 @@
|
||||
BDateFormatStyle style) const
|
||||
\sa BLocale::FormatTime(char* string, size_t maxSize, time_t time,
|
||||
BTimeFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -310,7 +355,7 @@
|
||||
BDateFormatStyle dateStyle, BTimeFormatStyle timeStyle,
|
||||
const BTimeZone* timeZone) const
|
||||
\brief Fills in \a string with a formatted datetime for the given
|
||||
\a time, \a timeStyle, and \a timeZone for the locale.
|
||||
\a time, \a timeStyle, and \a timeZone for the locale.
|
||||
|
||||
\param target The string buffer to fill with the formatted date.
|
||||
\param time The time (in seconds since epoch) to format
|
||||
@@ -327,6 +372,8 @@
|
||||
BDateFormatStyle style, const BTimeZone* timeZone) const
|
||||
\sa status_t BLocale::FormatTime(BString* string, time_t time,
|
||||
BTimeFormatStyle style, const BTimeZone* timeZone) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -334,7 +381,7 @@
|
||||
\fn ssize_t BLocale::FormatTime(char* string, size_t maxSize, time_t time,
|
||||
BTimeFormatStyle style) const
|
||||
\brief Fills in \a string with a formatted date up to \a maxSize bytes for
|
||||
the given \a time and \a style for the locale.
|
||||
the given \a time and \a style for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted time.
|
||||
\param maxSize The size of the buffer.
|
||||
@@ -351,6 +398,8 @@
|
||||
\sa BLocale::FormatDateTime(char* target, size_t maxSize,
|
||||
time_t time, BDateFormatStyle dateStyle,
|
||||
BTimeFormatStyle timeStyle) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -358,7 +407,7 @@
|
||||
\fn status_t BLocale::FormatTime(BString* string, time_t time,
|
||||
BTimeFormatStyle style, const BTimeZone* timeZone) const
|
||||
\brief Fills in \a string with a formatted time for the given
|
||||
\a time, \a style, and \a timeZone for the locale.
|
||||
\a time, \a style, and \a timeZone for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted date.
|
||||
\param time The time (in seconds since epoch) to format
|
||||
@@ -375,6 +424,8 @@
|
||||
\sa BLocale::FormatDateTime(BString* target, time_t time,
|
||||
BDateFormatStyle dateStyle, BTimeFormatStyle timeStyle,
|
||||
const BTimeZone* timeZone) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -382,7 +433,7 @@
|
||||
\fn status_t BLocale::FormatTime(BString* string, int*& fieldPositions,
|
||||
int& fieldCount, time_t time, BTimeFormatStyle style) const
|
||||
\brief Fills in \a string with a formatted time for the given
|
||||
\a time and \a style for the locale.
|
||||
\a time and \a style for the locale.
|
||||
|
||||
\param string The string buffer to fill with the formatted time.
|
||||
\param fieldPositions ???
|
||||
@@ -398,6 +449,8 @@
|
||||
|
||||
\sa BLocale::FormatDate(BString* string, int*& fieldPositions,
|
||||
int& fieldCount, time_t time, BDateFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -424,6 +477,8 @@
|
||||
|
||||
\sa BLocale::GetDateFields(BDateElement*& fields, int& fieldCount,
|
||||
BDateFormatStyle style) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -431,7 +486,7 @@
|
||||
\fn ssize_t BLocale::FormatNumber(char* string, size_t maxSize,
|
||||
double value) const
|
||||
\brief Format the \c double \a value as a string and put the result
|
||||
into \a string up to \a maxSize bytes in the current locale.
|
||||
into \a string up to \a maxSize bytes in the current locale.
|
||||
|
||||
\param string The string to put the formatted number into.
|
||||
\param maxSize The maximum of bytes to copy into \a string.
|
||||
@@ -440,20 +495,22 @@
|
||||
\returns The length of the string created or an error status code.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(char* string, size_t maxSize,
|
||||
int32 value) const
|
||||
\sa ssize_t BLocale::FormatMonetary(char* string, size_t maxSize,
|
||||
double value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocale::FormatNumber(BString* string, double value) const
|
||||
\brief \brief Format the \c double \a value as a string and put the
|
||||
result into \a string in the current locale.
|
||||
result into \a string in the current locale.
|
||||
|
||||
\param string The string to put the formatted number into.
|
||||
\param value The number that you want to get a formatted version of.
|
||||
@@ -462,11 +519,13 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(BString* string, int32 value) const
|
||||
\sa BLocale::FormatMonetary(BString* string, double value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -474,7 +533,7 @@
|
||||
\fn ssize_t BLocale::FormatNumber(char* string, size_t maxSize,
|
||||
int32 value) const
|
||||
\brief Format the \c int32 \a value as a string and put the result
|
||||
into \a string up to \a maxSize bytes in the current locale.
|
||||
into \a string up to \a maxSize bytes in the current locale.
|
||||
|
||||
\param string The string to put the formatted number into.
|
||||
\param maxSize The maximum of bytes to copy into \a string.
|
||||
@@ -483,20 +542,22 @@
|
||||
\returns The length of the string created or an error status code.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(char* string, size_t maxSize,
|
||||
double value) const
|
||||
\sa BLocale::FormatMonetary(char* string, size_t maxSize,
|
||||
double value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocale::FormatNumber(BString* string, int32 value) const
|
||||
\brief \brief Format the \c int32 \a value as a string and put the result
|
||||
into \a string in the current locale.
|
||||
\brief Format the \c int32 \a value as a string and put the result
|
||||
into \a string in the current locale.
|
||||
|
||||
\param string The string to put the formatted number into.
|
||||
\param value The number that you want to get a formatted version of.
|
||||
@@ -505,11 +566,13 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(BString* string, double value) const
|
||||
\sa BLocale::FormatMonetary(BString* string, double value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -517,7 +580,7 @@
|
||||
\fn ssize_t BLocale::FormatMonetary(char* string, size_t maxSize,
|
||||
double value) const
|
||||
\brief Format the \c double \a value as a monetary string and put the
|
||||
result into \a string up to \a maxSize bytes in the current locale.
|
||||
result into \a string up to \a maxSize bytes in the current locale.
|
||||
|
||||
\param string The \a string to put the monetary formatted number into.
|
||||
\param maxSize The maximum of bytes to copy into \a string.
|
||||
@@ -526,18 +589,20 @@
|
||||
\returns The length of the string created or an error status code.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(char* string, size_t maxSize, double value) const
|
||||
\sa BLocale::FormatNumber(char* string, size_t maxSize, int32 value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocale::FormatMonetary(BString* string, double value) const
|
||||
\brief \brief Format the \c double \a value as a monetary string and put
|
||||
the result into \a string in the current locale.
|
||||
\brief Format the \c double \a value as a monetary string and put
|
||||
the result into \a string in the current locale.
|
||||
|
||||
\param string The \a string to put the monetary formatted number into.
|
||||
\param value The number to format as a monetary \a value.
|
||||
@@ -546,9 +611,11 @@
|
||||
\retval B_OK Everything went fine.
|
||||
\retval B_ERROR Unable to lock the BLocale.
|
||||
\retval B_NO_MEMORY Ran out of memory while creating the NumberFormat
|
||||
object.
|
||||
object.
|
||||
\retval B_BAD_VALUE An error occurred while formatting the number.
|
||||
|
||||
\sa BLocale::FormatNumber(BString* string, double value) const
|
||||
\sa BLocale::FormatNumber(BString* string, int32 value) const
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -32,36 +32,48 @@
|
||||
classes from the Locale Kit can be constructed on their own, but only the
|
||||
Locale Roster allows you to do so while taking account of the user's locale
|
||||
settings.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocaleRoster::BLocaleRoster()
|
||||
\brief Constructor. Does nothing.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocaleRoster::~BLocaleRoster()
|
||||
\brief Destructor. Does nothing.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLocaleRoster* BLocaleRoster::Default()
|
||||
\brief Returns default BLocalRoster.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocaleRoster::Refresh()
|
||||
\brief Refreshes the BLocalRoster.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocaleRoster::GetDefaultTimeZone(BTimeZone* timezone) const
|
||||
\brief Get the default timezone.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -69,6 +81,8 @@
|
||||
\fn status_t BLocaleRoster::GetLanguage(const char* languagecode,
|
||||
BLanguage** _language) const
|
||||
\brief Instantiate a language from its code.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -79,33 +93,41 @@
|
||||
This function fills in the given message with one or more language string
|
||||
fields. They constitute the ordered list of user-selected languages to use
|
||||
for string translation.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocaleRoster::GetAvailableLanguages(BMessage* message) const
|
||||
\brief Fills \c message with 'language'-fields containing the language
|
||||
ID(s) of all available languages.
|
||||
ID(s) of all available languages.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocaleRoster::GetAvailableCountries(BMessage* message) const
|
||||
\brief Fills in the passed in \a message with one or more 'country'
|
||||
string fields, containing the (ISO-639) code of each country.
|
||||
string fields, containing the (ISO-639) code of each country.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BLocaleRoster::GetAvailableTimeZones(BMessage* timeZones) const
|
||||
\brief Fills in the passed in \a timeZones message with all time zone
|
||||
strings for the locale.
|
||||
strings for the locale.
|
||||
|
||||
\returns A status code.
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE A \c NULL \a timeZones message was passed in.
|
||||
\retval B_ERROR An error occurred trying to retrieve the localized time zone
|
||||
strings.
|
||||
strings.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -113,14 +135,16 @@
|
||||
\fn status_t BLocaleRoster::GetAvailableTimeZonesForCountry(
|
||||
BMessage* timeZones, const char* countryCode) const
|
||||
\brief Fills in the passed in \a timeZones message with one or more
|
||||
time zone strings containing the time zones for the
|
||||
country specified by \a countryCode for the locale.
|
||||
time zone strings containing the time zones for the
|
||||
country specified by \a countryCode for the locale.
|
||||
|
||||
\returns A status code.
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE A \c NULL \a timeZones message was passed in.
|
||||
\retval B_ERROR An error occurred trying to retrieve the localized time
|
||||
zones most likely due to an invalid \a countryCode.
|
||||
zones most likely due to an invalid \a countryCode.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -134,7 +158,9 @@
|
||||
\retval B_BAD_VALUE A \c NULL or invalid \a countryCode was passed in.
|
||||
\retval B_ERROR Error locking the default RosterData.
|
||||
\retval B_NAME_NOT_FOUND The flag could not be found for the
|
||||
\a countryCode.
|
||||
\a countryCode.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -154,7 +180,9 @@
|
||||
\retval B_BAD_VALUE A \c NULL or invalid \a languageCode was passed in.
|
||||
\retval B_ERROR Error locking the default RosterData.
|
||||
\retval B_NAME_NOT_FOUND The flag could not be found for the
|
||||
default country's flag for the \a languageCode.
|
||||
default country's flag for the \a languageCode.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -175,6 +203,8 @@
|
||||
\retval B_OK Everything went well.
|
||||
\retval B_BAD_VALUE A \c NULL \a languageList message was passed in.
|
||||
\retval B_ERROR Error locking the default RosterData.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -183,6 +213,8 @@
|
||||
\brief Returns whether or not filesystem translation is preferred.
|
||||
|
||||
\returns \c B_ERROR if there was an error locking the default RosterData.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -205,7 +237,9 @@
|
||||
\returns A status code.
|
||||
\retval B_OK: success
|
||||
\retval B_ENTRY_NOT_FOUND: failure. Attribute not found, entry not found
|
||||
in catalog, etc.
|
||||
in catalog, etc.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -219,16 +253,18 @@
|
||||
specify a fingerprint. The language will be selected from the user
|
||||
preferences.
|
||||
|
||||
This function is used by the Locale Kit macros.
|
||||
This function is used by the Locale Kit macros.
|
||||
|
||||
\warning This function needs the calling image to be linked with
|
||||
liblocalestub.a
|
||||
liblocalestub.a
|
||||
|
||||
\returns The catalog, if it was loaded successfully.
|
||||
|
||||
\param catalog The catalog to load. The pointer location is used to identify
|
||||
the image for which to load the catalog.
|
||||
\param catalogInitStatus the state of the catalog. This will be set to true
|
||||
on the first call for a given catalog, and if already true the function
|
||||
will do nothing on subsequent calls.
|
||||
\param catalog The catalog to load. The pointer location is used to
|
||||
identify the image for which to load the catalog.
|
||||
\param catalogInitStatus the state of the catalog. This will be set to
|
||||
true on the first call for a given catalog, and if already true
|
||||
the function will do nothing on subsequent calls.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
\ingroup locale
|
||||
\ingroup libbe
|
||||
\brief Provides information about time zones.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,22 +39,30 @@
|
||||
know its code. If you don't know the code, you can instead go through the
|
||||
BCountry class which can enumerate all timezones in a country, or use the
|
||||
BLocaleRoster, which knows the timezone selected by the user.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BTimeZone::BTimeZone(const BTimeZone& other)
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BTimeZone& BTimeZone::operator=(const BTimeZone& source)
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn const BString& BTimeZone::ID() const
|
||||
\brief Returns the ID of the time zone.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -61,25 +71,33 @@
|
||||
\brief Returns the localized name of the time zone.
|
||||
|
||||
Use this method to display the time zone's name to the user.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn const BString& BTimeZone::DaylightSavingName() const
|
||||
\brief Returns the name of the daylight savings rules used in this timezone.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn const BString& BTimeZone::ShortName() const
|
||||
\brief Returns the short name of the timezone, in the user's locale.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn const BString& BTimeZone::ShortDaylightSavingName() const
|
||||
\brief Returns the short name of the daylight savings rules used in this
|
||||
timezone.
|
||||
timezone.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -88,20 +106,26 @@
|
||||
\brief Return the offset from GMT.
|
||||
|
||||
The offset is a number of seconds, positive or negative.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn bool BTimeZone::SupportsDaylightSaving() const
|
||||
\brief Return true if the time zone has daylight saving rules
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn status_t BTimeZone::InitCheck() const
|
||||
\brief Return \c false if there was an error creating the timezone
|
||||
for instance if you called the constructor or SetTo() with an invalid
|
||||
timezone code.)
|
||||
for instance if you called the constructor or SetTo() with an
|
||||
invalid timezone code.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -111,5 +135,7 @@
|
||||
\brief Set the timezone to another code.
|
||||
|
||||
\returns \c false if there was an error (likely due to an invalid
|
||||
timezone code.)
|
||||
timezone code.)
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
Note all the function work with chars encoded in UTF-32. This is not the
|
||||
most usual way to handle characters, but it is the fastest. To convert an
|
||||
UTF-8 string to an UTF-32 character use the FromUTF8() method.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -47,7 +49,9 @@
|
||||
\brief Determine if \a c is alphabetic.
|
||||
|
||||
\returns \c true if the specified unicode character is an
|
||||
alphabetic character.
|
||||
alphabetic character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -56,7 +60,9 @@
|
||||
\brief Determine if \a c is alphanumeric.
|
||||
|
||||
\returns \c true if the specified unicode character is a
|
||||
alphabetic or numeric character.
|
||||
alphabetic or numeric character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -65,7 +71,9 @@
|
||||
\brief Determine if \a c is numeric.
|
||||
|
||||
\returns \c true if the specified unicode character is a
|
||||
number character.
|
||||
number character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -74,7 +82,9 @@
|
||||
\brief Determine if \a c is a hexadecimal digit.
|
||||
|
||||
\returns \c true if the specified unicode character is a
|
||||
hexadecimal number character.
|
||||
hexadecimal number character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -83,7 +93,9 @@
|
||||
\brief Determine if \a c is uppercase.
|
||||
|
||||
\returns \c true if the specified unicode character is an
|
||||
uppercase character.
|
||||
uppercase character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -92,7 +104,9 @@
|
||||
\brief Determine if \a c is lowercase.
|
||||
|
||||
\returns \c true if the specified unicode character is a
|
||||
lowercase character.
|
||||
lowercase character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -105,9 +119,11 @@
|
||||
as an empty space which can be stretched on-screen.
|
||||
|
||||
\returns \c true if the specified unicode character is some
|
||||
kind of a space character.
|
||||
kind of a space character.
|
||||
|
||||
\sa IsWhitespace()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -119,9 +135,11 @@
|
||||
non-breakable spaces.
|
||||
|
||||
\returns \c true if the specified unicode character is a whitespace
|
||||
character.
|
||||
character.
|
||||
|
||||
\sa IsSpace()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -133,9 +151,11 @@
|
||||
0x0 to 0x1F.
|
||||
|
||||
\returns \c true if the specified unicode character is a control
|
||||
character.
|
||||
character.
|
||||
|
||||
\sa IsPrintable()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -144,7 +164,9 @@
|
||||
\brief Determine if \a c is punctuation character.
|
||||
|
||||
\returns \c true if the specified unicode character is a
|
||||
punctuation character.
|
||||
punctuation character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -155,9 +177,11 @@
|
||||
Printable characters are not control characters.
|
||||
|
||||
\returns \c true if the specified unicode character is a printable
|
||||
character.
|
||||
character.
|
||||
|
||||
\sa IsControl()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -168,7 +192,9 @@
|
||||
Title case characters are a smaller version of normal uppercase letters.
|
||||
|
||||
\returns \c true if the specified unicode character is a title case
|
||||
character.
|
||||
character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -180,6 +206,8 @@
|
||||
For these codes this method will return \c false.
|
||||
|
||||
\returns \c true if the specified unicode character is defined.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -190,7 +218,9 @@
|
||||
\note IsBase() does not determine if a unicode character is distinct.
|
||||
|
||||
\returns \c true if the specified unicode character is a base
|
||||
form character that can be used with a diacritic.
|
||||
form character that can be used with a diacritic.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -199,6 +229,8 @@
|
||||
\brief Gets the type of a character.
|
||||
|
||||
\returns A member of the \c unicode_char_category enum.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -207,6 +239,8 @@
|
||||
\brief Transforms \a c to lowercase.
|
||||
|
||||
\returns The lowercase version of the specified unicode character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -215,6 +249,8 @@
|
||||
\brief Transforms \a c to uppercase.
|
||||
|
||||
\returns The uppercase version of the specified unicode character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -223,6 +259,8 @@
|
||||
\brief Transforms \a c to title case.
|
||||
|
||||
\returns The title case version of the specified unicode character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
@@ -231,19 +269,23 @@
|
||||
\brief Gets the numeric value \a c.
|
||||
|
||||
\returns The numeric version of the specified unicode character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BUnicodeChar::ToUTF8(uint32 c, char **out)
|
||||
\fn void BUnicodeChar::ToUTF8(uint32 c, char** out)
|
||||
\brief Transform a character to UTF-8 encoding.
|
||||
|
||||
\returns The UTF-8 encoding of the specified unicode character.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn uint32 BUnicodeChar::FromUTF8(const char **in)
|
||||
\fn uint32 BUnicodeChar::FromUTF8(const char** in)
|
||||
\brief Transform a UTF-8 string to an UTF-32 character.
|
||||
|
||||
If the string contains multiple characters, only the fist one is used.
|
||||
@@ -251,27 +293,35 @@
|
||||
character for the following call.
|
||||
|
||||
\returns The UTF-32 encoded version of \a in.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn size_t BUnicodeChar::UTF8StringLength(const char *str)
|
||||
\fn size_t BUnicodeChar::UTF8StringLength(const char* string)
|
||||
\brief Counts the characters in the given \c NUL terminated string.
|
||||
|
||||
\returns the number of UTF-8 characters in the \c NUL terminated string.
|
||||
|
||||
\sa BString::CountChars()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn size_t BUnicodeChar::UTF8StringLength(const char *str, size_t maxLength)
|
||||
\fn size_t BUnicodeChar::UTF8StringLength(const char* string,
|
||||
size_t maxLength)
|
||||
\brief Counts the characters in the given string up to \a maxLength
|
||||
characters.
|
||||
|
||||
The string does not need to be \c NUL terminated if you specify a
|
||||
\a maxLength that is shorter than the maximum length of the string.
|
||||
\param string does not need to be \c NUL terminated if you specify a
|
||||
\a maxLength that is shorter than the maximum length of the string.
|
||||
\param maxLength The maximum length of the string in bytes.
|
||||
|
||||
\returns the number of UTF-8 characters in the \c NUL terminated string
|
||||
up to \a maxLength characters.
|
||||
up to \a maxLength characters.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user