foobar2000 SDK  2015-08-03
Public Member Functions
pfc::string_filename

#include <string_base.h>

+ Inheritance diagram for pfc::string_filename:

Public Member Functions

 string_filename (const char *fn)
 
- Public Member Functions inherited from pfc::string8_t< pfc::alloc_standard >
 string8_t ()
 
 string8_t (const char *p_string)
 
 string8_t (const char *p_string, t_size p_length)
 
 string8_t (const t_self &p_string)
 
 string8_t (const string_base &p_string)
 
 string8_t (string_part_ref ref)
 
void add_string (const char *p_string, t_size p_length=~0)
 
void add_string (string_part_ref ref)
 
void add_string_ (const char *str)
 
void add_string_nc (const char *ptr, t_size len)
 
void fix_filename_chars (char def= '_', char leave=0)
 
void force_reset ()
 
t_size get_length () const throw ()
 
const char * get_ptr () const throw ()
 
void insert_chars (t_size first, const char *src, t_size count)
 
void insert_chars (t_size first, const char *src)
 
char * lock_buffer (t_size n)
 
 operator const char * () const throw ()
 
const t_selfoperator+= (const char *src)
 
const t_selfoperator+= (const string_base &src)
 
const t_selfoperator+= (const t_self &src)
 
const t_selfoperator+= (string_part_ref src)
 
const t_selfoperator= (const char *src)
 
const t_selfoperator= (const string_base &src)
 
const t_selfoperator= (const t_self &src)
 
const t_selfoperator= (string_part_ref src)
 
void prealloc (t_size p_size)
 
void remove_chars (t_size first, t_size count)
 
t_size replace_byte (char c1, char c2, t_size start=0)
 
t_size replace_char (unsigned c1, unsigned c2, t_size start=0)
 
t_size replace_nontext_chars (char p_replace= '_')
 
void set_char (unsigned offset, char c)
 
void set_string (const char *p_string, t_size p_length=~0)
 
void set_string (string_part_ref ref)
 
void set_string_ (const char *str)
 
void set_string_nc (const char *ptr, t_size len)
 
void truncate (t_size len)
 
void unlock_buffer ()
 
- Public Member Functions inherited from pfc::string_base
string_base_formatter () const
 
void add_filename (const char *fn)
 
const char * c_str () const
 
void convert_to_lower_ascii (const char *src, char replace= '?')
 
void delimit (const char *c)
 
void end_with (char c)
 
void end_with_slash ()
 
bool ends_with (char c) const
 
t_size find_first (char p_char, t_size p_start=0) const
 
t_size find_first (const char *p_string, t_size p_start=0) const
 
t_size find_last (char p_char, t_size p_start=~0) const
 
t_size find_last (const char *p_string, t_size p_start=~0) const
 
void fix_dir_separator (char c= '\\')
 
bool fix_eol (const char *append=" (...)", t_size start=0)
 
bool has_prefix (const char *prefix) const
 
bool has_prefix_i (const char *prefix) const
 
bool has_suffix (const char *suffix) const
 
bool has_suffix_i (const char *suffix) const
 
bool is_empty () const
 
bool is_valid_utf8 () const
 
char last_char () const
 
t_size length () const
 
bool limit_length (t_size length_in_chars, const char *append=" (...)")
 
 operator const char * () const
 
bool operator!= (const string_base &p_other) const
 
const string_baseoperator+= (const char *src)
 
const string_baseoperator+= (const string_base &src)
 
bool operator< (const string_base &p_other) const
 
bool operator<= (const string_base &p_other) const
 
const string_baseoperator= (const char *src)
 
const string_baseoperator= (const string_base &src)
 
bool operator== (const string_base &p_other) const
 
bool operator> (const string_base &p_other) const
 
bool operator>= (const string_base &p_other) const
 
t_size replace_string (const char *replace, const char *replaceWith, t_size start=0)
 
void reset ()
 
t_size scan_filename () const
 
void set_string_ (const char *str)
 
void skip_trailing_char (unsigned c= ' ')
 
const char * toString () const
 
bool truncate_eol (t_size start=0)
 
void truncate_filename ()
 
void truncate_last_char ()
 
void truncate_number_suffix ()
 
void truncate_to_parent_path ()
 
- Public Member Functions inherited from pfc::string_receiver
void add_byte (char c)
 
void add_char (t_uint32 c)
 
void add_chars (t_uint32 p_char, t_size p_count)
 
void add_string_ (const char *str)
 

Additional Inherited Members

- Static Public Member Functions inherited from pfc::string8_t< pfc::alloc_standard >
static void g_swap (t_self &p_item1, t_self &p_item2)
 
- Protected Member Functions inherited from pfc::string8_t< pfc::alloc_standard >
const char * _get_ptr () const throw ()
 
void makespace (t_size s)
 
- Protected Member Functions inherited from pfc::string_base
 string_base ()
 
 ~string_base ()
 
- Protected Member Functions inherited from pfc::string_receiver
 string_receiver ()
 
 ~string_receiver ()
 
- Protected Attributes inherited from pfc::string8_t< pfc::alloc_standard >
pfc::array_t< char, pfc::alloc_standardm_data
 
t_size used
 

Detailed Description

Definition at line 501 of file string_base.h.

Constructor & Destructor Documentation

pfc::string_filename::string_filename ( const char *  fn)
explicit

Definition at line 87 of file string_base.cpp.

88 {
89  fn += pfc::scan_filename(fn);
90  const char * ptr=fn,*dot=0;
91  while(*ptr && *ptr!='?')
92  {
93  if (*ptr=='.') dot=ptr;
94  ptr++;
95  }
96 
97  if (dot && dot>fn) set_string(fn,dot-fn);
98  else set_string(fn);
99 }
void set_string(const char *p_string, t_size p_length=~0)
t_size scan_filename(const char *ptr)

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