3 template<
template<
typename>
class t_alloc>
6 if (m_data.is_owned(ptr)) {
10 add_string_nc(ptr, len);
14 template<
template<
typename>
class t_alloc>
16 if (m_data.is_owned(ptr)) {
20 set_string_nc(ptr, len);
24 template<
template<
typename>
class t_alloc>
27 if (!c) truncate(offset);
28 else if (offset<used) m_data[offset]=c;
31 template<
template<
typename>
class t_alloc>
39 template<
template<
typename>
class t_alloc>
42 if (first>used) first = used;
43 if (first+count>used) count = used-first;
47 for(n=first+count;n<=used;n++)
48 m_data[n-count]=m_data[n];
54 template<
template<
typename>
class t_alloc>
57 if (first > used) first = used;
59 makespace(used+count+1);
61 for(n=used;(int)n>=(
int)first;n--)
62 m_data[n+count] = m_data[n];
64 m_data[first+n] = src[n];
69 template<
template<
typename>
class t_alloc>
73 template<
template<
typename>
class t_alloc>
79 if ((
unsigned char)m_data[n] < 32) {m_data[n] = p_replace; ret++; }
84 template<
template<
typename>
class t_alloc>
87 PFC_ASSERT(c1 != 0); PFC_ASSERT(c2 != 0);
89 for(n=start;n<used;n++)
91 if (m_data[n] == c1) {m_data[n] = c2; ret++;}
96 template<
template<
typename>
class t_alloc>
99 if (c1 < 128 && c2 < 128)
return replace_byte((
char)c1,(
char)c2,start);
103 const char * ptr = temp;
109 if (delta==0 || test==0)
break;
110 if (test == c1) {test = c2;rv++;}
void set_string(const char *p_string, t_size p_length=~0)
void fix_filename_chars(char def= '_', char leave=0)
t_size replace_char(unsigned c1, unsigned c2, t_size start=0)
void set_char(unsigned offset, char c)
void remove_chars(t_size first, t_size count)
string8_t< pfc::alloc_standard > string8
void add_string(const char *p_string, t_size p_length=~0)
t_size strlen_max(const char *ptr, t_size max)
t_size utf8_decode_char(const char *src, unsigned &out, t_size src_bytes)
void insert_chars(t_size first, const char *src, t_size count)
bool is_path_bad_char(unsigned c)
t_size replace_nontext_chars(char p_replace= '_')
t_size replace_byte(char c1, char c2, t_size start=0)