ZenLib::FileName Class Reference

File name manipulation. More...

`#include <FileName.h>`

Inheritance diagram for ZenLib::FileName:

## Public Member Functions

| FileName ()
| FileName (const tstring &str)
| FileName (const tstring &str, size_type pos, size_type n=npos)
| FileName (const Char *s, size_type n)
| FileName (const Char *s)
| FileName (size_type n, char c)
ZenLib::Ztring | Path_Get () const
ZenLib::Ztring | Name_Get () const
ZenLib::Ztring | Extension_Get () const
ZenLib::Ztring & | Path_Set (const Ztring &Path)
ZenLib::Ztring & | Name_Set (const Ztring &Name)
ZenLib::Ztring & | Extension_Set (const Ztring &Extension)
Public Member Functions inherited from ZenLib::Ztring
| Ztring ()
| Ztring (const tstring &str)
| Ztring (const tstring &str, size_type pos, size_type n=npos)
| Ztring (const Char *s, size_type n)
| Ztring (const Char *s)
| Ztring (size_type n, Char c)
Char & | operator() (size_type Pos)
| Same as [], but resize the string if Pos doesn't exist yet.
bool | Assign_FromFile (const Ztring &FileName)
Ztring & | From_Unicode (const std::wstring &S)
| convert an Unicode encoded string into Ztring
Ztring & | From_Unicode (const wchar_t S)
| convert an Unicode encoded wchar_t into Ztring
Ztring & | From_Unicode (const wchar_t *S)
| convert an Unicode encoded string into Ztring
Ztring & | From_Unicode (const wchar_t *S, size_type Start, size_type Length)
| convert an Unicode encoded string into Ztring
Ztring & | From_Unicode (const wchar_t *S, size_type Length)
| convert an Unicode encoded string into Ztring
Ztring & | From_UTF8 (const std::string &S)
| convert an UTF-8 encoded string into Ztring
Ztring & | From_UTF8 (const char *S)
| convert an UTF-8 encoded string into Ztring
Ztring & | From_UTF8 (const char *S, size_type Start, size_type Length)
| convert an UTF-8 encoded string into Ztring
Ztring & | From_UTF8 (const char *S, size_type Length)
| convert an UTF-8 encoded string into Ztring
Ztring & | From_UTF16 (const char *S)
| convert an UTF-16 encoded string into Ztring
Ztring & | From_UTF16 (const char *S, size_type Start, size_type Length)
| convert an UTF-16 encoded string into Ztring
Ztring & | From_UTF16 (const char *S, size_type Length)
| convert an UTF-16 encoded string into Ztring
Ztring & | From_UTF16BE (const char *S)
| convert an UTF-16BE encoded string into Ztring
Ztring & | From_UTF16BE (const char *S, size_type Start, size_type Length)
| convert an UTF-16BE encoded string into Ztring
Ztring & | From_UTF16BE (const char *S, size_type Length)
| convert an UTF-16BE encoded string into Ztring
Ztring & | From_UTF16LE (const char *S)
| convert an UTF-16LE encoded string into Ztring
Ztring & | From_UTF16LE (const char *S, size_type Start, size_type Length)
| convert an UTF-16LE encoded string into Ztring
Ztring & | From_UTF16LE (const char *S, size_type Length)
| convert an UTF-16LE encoded string into Ztring
Ztring & | From_Local (const std::string &S)
| convert an Locael encoded string into Ztring
Ztring & | From_Local (const char *S)
| convert an Local encoded string into Ztring
Ztring & | From_Local (const char *S, size_type Start, size_type Length)
| convert an Local encoded string into Ztring
Ztring & | From_Local (const char *S, size_type Length)
| convert an Local encoded string into Ztring
Ztring & | From_ISO_8859_1 (const char *S)
| convert an ISO-8859-1 encoded string into Ztring
Ztring & | From_ISO_8859_1 (const char *S, size_type Start, size_type Length)
| convert an ISO-8859-1 encoded string into Ztring
Ztring & | From_ISO_8859_1 (const char *S, size_type Length)
| convert an ISO-8859-1 encoded string into Ztring
Ztring & | From_ISO_8859_2 (const char *S)
| convert an ISO-8859-2 encoded string into Ztring
Ztring & | From_ISO_8859_2 (const char *S, size_type Start, size_type Length)
| convert an ISO-8859-1 encoded string into Ztring
Ztring & | From_ISO_8859_2 (const char *S, size_type Length)
| convert an ISO-8859-1 encoded string into Ztring
Ztring & | From_GUID (const int128u S)
| convert an 16 byte GUID into Ztring
Ztring & | From_UUID (const int128u S)
| convert an 16 byte UUID into Ztring
Ztring & | From_CC4 (const char *S)
| convert an 4 Character Code into Ztring
Ztring & | From_CC4 (const int8u *S)
| convert an 4 Character Code into Ztring
Ztring & | From_CC4 (const int32u S)
| convert an 4 Character Code into Ztring
Ztring & | From_CC3 (const char *S)
| convert an 2 Character Code into Ztring
Ztring & | From_CC3 (const int8u *S)
| convert an 4 Character Code into Ztring
Ztring & | From_CC3 (const int32u S)
| convert an 4 Character Code into Ztring
Ztring & | From_CC2 (const char *S)
| convert an 2 Character Code into Ztring
Ztring & | From_CC2 (const int8u *S)
| convert an 2 Character Code into Ztring
Ztring & | From_CC2 (const int16u S)
| convert an 2 Character Code into Ztring
Ztring & | From_CC1 (const char *S)
| convert an 1 Character Code into Ztring
Ztring & | From_CC1 (const int8u *S)
| convert an 1 Character Code into Ztring
Ztring & | From_CC1 (const int8u S)
| convert an 1 Character Code into Ztring
Ztring & | From_Number (const int8s, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int8u, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int16s, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int16u, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int32s, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int32u, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int64s, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int64u, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const int128u, int8u Radix=10)
| convert number into Ztring
Ztring & | From_Number (const float32, int8u AfterComma=3, ztring_t Options=Ztring_Nothing)
| convert number into Ztring
Ztring & | From_Number (const float64, int8u AfterComma=3, ztring_t Options=Ztring_Nothing)
| convert number into Ztring
Ztring & | From_Number (const float80, int8u AfterComma=3, ztring_t Options=Ztring_Nothing)
| convert number into Ztring
Ztring & | From_BCD (const int8u)
| convert number (BCD coded) into Ztring
Ztring & | Duration_From_Milliseconds (const int64s Milliseconds)
| convert count of milliseconds into a readable and sortable string
Ztring & | Duration_From_Milliseconds (const int64u Milliseconds)
Ztring & | Date_From_Milliseconds_1601 (const int64u Milliseconds)
| convert count of seconds since 1601 into a readable and sortable string
Ztring & | Date_From_Seconds_1601 (const int64u Seconds)
| convert count of seconds since 1601 into a readable and sortable string
Ztring & | Date_From_Seconds_1900 (const int32u Seconds)
| convert count of seconds since 1900 into a readable and sortable string
Ztring & | Date_From_Seconds_1900 (const int64s Seconds)
| convert count of seconds since 1900 into a readable and sortable string
Ztring & | Date_From_Seconds_1904 (const int32u Seconds)
| convert count of seconds since 1904 into a readable and sortable string
Ztring & | Date_From_Seconds_1904 (const int64u Seconds)
| convert count of seconds since 1904 into a readable and sortable string
Ztring & | Date_From_Seconds_1904 (const int64s Seconds)
| convert count of seconds since 1904 into a readable and sortable string
Ztring & | Date_From_Seconds_1970 (const int32u Seconds)
| convert count of seconds since 1970 into a readable and sortable string
Ztring & | Date_From_Seconds_1970 (const int32s Seconds)
| convert count of seconds since 1970 into a readable and sortable string
Ztring & | Date_From_Seconds_1970 (const int64s Seconds)
| convert count of seconds since 1970 into a readable and sortable string
Ztring & | Date_From_Seconds_1970_Local (const int32u Seconds)
| convert count of seconds since 1970 into a readable and sortable string (in local time)
Ztring & | Date_From_String (const char *Date, size_type Value_Size=Error)
| convert a free formated string into a readable and sortable string
Ztring & | Date_From_Numbers (const int8u Year, const int8u Month, const int8u Day, const int8u Hour, const int8u Minute, const int8u Second)
| convert numbers into a readable and sortable string
std::wstring | To_Unicode () const
| Convert into Unicode chars.
std::string | To_UTF8 () const
| Convert into char* (UTF-8 encoded).
std::string | To_Local () const
| Convert into char* (Local encoded).
int128u | To_UUID () const
| Convert into 16 byte UUID number.
int32u | To_CC4 () const
| Convert into a 4 Character Code.
int8s | To_int8s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into Int (8 bits).
int8u | To_int8u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into unsigned Int (8 bits).
int16s | To_int16s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into Int (16 bits).
int16u | To_int16u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into unsigned Int (16 bits).
int32s | To_int32s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into Int (32 bits).
int32u | To_int32u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into unsigned Int (32 bits).
int64s | To_int64s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into Int (64 bits).
int64u | To_int64u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into unsigned Int (64 bits).
int128u | To_int128u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const
| Convert into unsigned Int (64 bits).
float32 | To_float32 (ztring_t Options=Ztring_Nothing) const
| Convert into float.
float64 | To_float64 (ztring_t Options=Ztring_Nothing) const
float80 | To_float80 (ztring_t Options=Ztring_Nothing) const
bool | IsNumber () const
| test if it is a number
Ztring & | MakeLowerCase ()
| convert into lowercase
Ztring & | MakeUpperCase ()
| convert into uppercase
Ztring & | TrimLeft (Char ToTrim=__T(' '))
| Remove leading whitespaces from a string.
Ztring & | TrimRight (Char ToTrim=__T(' '))
| Remove trailing whitespaces from a string.
Ztring & | Trim (Char ToTrim=__T(' '))
| Remove leading and trailing whitespaces from a string.
Ztring & | Quote (Char ToTrim=__T('\"'))
| Quotes a string.
Ztring | SubString (const tstring &Begin, const tstring &End, size_type Pos=0, ztring_t Options=Ztring_Nothing) const
| return a string between two strings
size_type | FindAndReplace (const tstring &ToFind, const tstring &ReplaceBy, size_type Pos=0, ztring_t Options=Ztring_Nothing)
| replace a string by another one
size_type | Count (const Ztring &ToCount, ztring_t Options=Ztring_Nothing) const
| Count the number of occurencies of a string in the string.
bool | Compare (const Ztring &ToCompare, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const
| compare with another string

## Static Public Member Functions

static ZenLib::Ztring | Path_Get (const Ztring &File_Name)
static ZenLib::Ztring | Name_Get (const Ztring &File_Name)
static ZenLib::Ztring | Extension_Get (const Ztring &File_Name)
static ZenLib::Ztring | TempFileName_Create (const Ztring &Prefix)
Static Public Member Functions inherited from ZenLib::Ztring
static Ztring | ToZtring_From_Local (const std::string &S)
static Ztring | ToZtring_From_Local (const char *S)
static Ztring | ToZtring_From_Local (const char *S, size_type Start, size_type Length)
static Ztring | ToZtring_From_Local (const char *S, size_type Length)
static Ztring | ToZtring_From_CC4 (const char *S)
static Ztring | ToZtring_From_CC4 (const int8u *S)
static Ztring | ToZtring_From_CC4 (const int32u S)
static Ztring | ToZtring_From_CC3 (const char *S)
static Ztring | ToZtring_From_CC3 (const int8u *S)
static Ztring | ToZtring_From_CC3 (const int32u S)
static Ztring | ToZtring_From_CC2 (const char *S)
static Ztring | ToZtring_From_CC2 (const int8u *S)
static Ztring | ToZtring_From_CC2 (const int16u S)
static Ztring | ToZtring_From_CC1 (const char *S)
static Ztring | ToZtring_From_CC1 (const int8u *S)
static Ztring | ToZtring_From_CC1 (const int8u S)
static Ztring | ToZtring (const int8s I, int8u Radix=10)
static Ztring | ToZtring (const int8u I, int8u Radix=10)
static Ztring | ToZtring (const int16s I, int8u Radix=10)
static Ztring | ToZtring (const int16u I, int8u Radix=10)
static Ztring | ToZtring (const int32s I, int8u Radix=10)
static Ztring | ToZtring (const int32u I, int8u Radix=10)
static Ztring | ToZtring (const int64s I, int8u Radix=10)
static Ztring | ToZtring (const int64u I, int8u Radix=10)
static Ztring | ToZtring (const int128u I, int8u Radix=10)
static Ztring | ToZtring (const float32 F, int8u AfterComma=3)
static Ztring | ToZtring (const float64 F, int8u AfterComma=3)
static Ztring | ToZtring (const float80 F, int8u AfterComma=3)

## Detailed Description

File name manipulation.

## Constructor & Destructor Documentation

## FileName() [1/6]

ZenLib::FileName::FileName | ( |  | ) |

inline

References ZenLib::Ztring::Ztring().

Referenced by Extension_Get(), Name_Get(), and Path_Get().

## FileName() [2/6]

ZenLib::FileName::FileName | ( | const tstring & | str | ) |

inline

References ZenLib::Ztring::Ztring().

## FileName() [3/6]

ZenLib::FileName::FileName | ( | const tstring & | str,
|  | size_type | pos,
|  | size_type | n = npos )

inline

References ZenLib::Ztring::Ztring().

## FileName() [4/6]

ZenLib::FileName::FileName | ( | const Char * | s,
|  | size_type | n )

inline

References ZenLib::Ztring::Ztring().

## FileName() [5/6]

ZenLib::FileName::FileName | ( | const Char * | s | ) |

inline

References ZenLib::Ztring::Ztring().

## FileName() [6/6]

ZenLib::FileName::FileName | ( | size_type | n,
|  | char | c )

inline

References ZenLib::Ztring::Ztring().

## Member Function Documentation

## Extension_Get() [1/2]

ZenLib::Ztring ZenLib::FileName::Extension_Get | ( |  | ) | const

## Extension_Get() [2/2]

ZenLib::Ztring ZenLib::FileName::Extension_Get | ( | const Ztring & | File_Name | ) |

inline static

References FileName(), and ZenLib::Ztring::Ztring().

## Extension_Set()

ZenLib::Ztring & ZenLib::FileName::Extension_Set | ( | const Ztring & | Extension | ) |

References ZenLib::Ztring::Ztring().

## Name_Get() [1/2]

ZenLib::Ztring ZenLib::FileName::Name_Get | ( |  | ) | const

## Name_Get() [2/2]

ZenLib::Ztring ZenLib::FileName::Name_Get | ( | const Ztring & | File_Name | ) |

inline static

References FileName(), and ZenLib::Ztring::Ztring().

## Name_Set()

ZenLib::Ztring & ZenLib::FileName::Name_Set | ( | const Ztring & | Name | ) |

References ZenLib::Ztring::Ztring().

## Path_Get() [1/2]

ZenLib::Ztring ZenLib::FileName::Path_Get | ( |  | ) | const

## Path_Get() [2/2]

ZenLib::Ztring ZenLib::FileName::Path_Get | ( | const Ztring & | File_Name | ) |

inline static

References FileName(), and ZenLib::Ztring::Ztring().

## Path_Set()

ZenLib::Ztring & ZenLib::FileName::Path_Set | ( | const Ztring & | Path | ) |

References ZenLib::Ztring::Ztring().

## TempFileName_Create()

ZenLib::Ztring ZenLib::FileName::TempFileName_Create | ( | const Ztring & | Prefix | ) |

static

References ZenLib::Ztring::Ztring().

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

- FileName.h