![]() | Class string | ![]() |
![]() ![]() Introduction ![]() ![]() ![]() no help | ![]() | string Class Referencestring class more... Public Member Functions
Detailed DescriptionConversion from/to int/double is done implicit. Member Documentation
|
Expression | Output |
---|---|
d | the day as number without a leading zero (1 to 31) |
dd | the day as number with a leading zero (01 to 31) |
ddd | the abbreviated localized day name (e.g. 'Mon' to 'Sun'). |
dddd | the long localized day name (e.g. 'Qt::Monday' to 'Qt::Sunday'). |
M | the month as number without a leading zero (1-12) |
MM | the month as number with a leading zero (01-12) |
MMM | the abbreviated localized month name (e.g. 'Jan' to 'Dec'). |
MMMM | the long localized month name (e.g. 'January' to 'December'). |
yy | the year as two digit number (00-99) |
yyyy | the year as four digit number (1752-8000) |
h | the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) |
hh | the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) |
m | the minute without a leading zero (0 to 59) |
mm | the minute with a leading zero (00 to 59) |
s | the second without a leading zero (0 to 59) |
ss | the second with a leading zero (00 to 59) |
z | the milliseconds without leading zeroes (0 to 999) |
zzz | the milliseconds with leading zeroes (000 to 999) |
AP | use AM/PM display. AP will be replaced by either "AM" or "PM". |
ap | use am/pm display. ap will be replaced by either "am" or "pm". |
set time
Set the string to the current time. With the string format the format can be set. Without the string the date is set to local setup. setDateTime for possible formats
set date
Set the string to the current date. With the string format the format can be set. Without the string the date is set to local setup. setDateTime for possible formats
index of
Returns the index position of the first occurrence of the string str in this string, searching forward from index position from. Returns -1 if str is not found.
index of
Returns the index position of the last occurrence of the string str in this string, searching backward from index position from. If from is -1, the search starts at the last character; if from is -2, at the next to last character and so on. Returns -1 if str is not found.
remove
Remove all str from the string. The removement is case sensitive.
replace
All existing strings match is replaced with with. The replacement is case sensitive.
parameter
string s="type=2 width=4 length=6";
s=s.parameter("width");
// s="4";
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
© 2008 Jürgen Thies