Byte const* byte_C() const;
char* ch_l();
Byte* byte_l();
-
+#if 0
/// deprecated; use ch_C()
operator char const*() const { return ch_C(); }
-
+#endif
String &operator =(String const & source);
/// concatenate s
void operator += (char const* s) { strh_ += s; }
void operator += (String s);
- /// is the string empty?
- operator bool () const
+ bool empty_b () const;
+#if 0
+ /** is the string empty?
+
+ Ugh-ugh-thank-you-cygnus. W32 barfs on this
+ */
+ operator bool () const;
{
return length_i ();
}
+#endif
void append (String);
void prepend (String);
return strh_.ch_l();
}
+bool
+String::empty_b () const
+{
+ return !length_i ();
+}
/**
Do a signed comparison, analogous to memcmp;
*/
find the substring.
@return
- index of leftmost occurrence of #searchfor#
+1 index of leftmost occurrence of #searchfor#
*/
int
String::index_i (String searchfor) const
Music_iterator * mi = get_iterator_p (i.ptr());
if (mi->ok())
{
- if (!chord_C_->translator_type_str_)
+ if (chord_C_->translator_type_str_.empty_b ())
set_translator (mi->report_to_l()->ancestor_l (chord_C_->multi_level_i_));
children_p_list_.bottom().add (mi);
}
void
Clef_engraver::acknowledge_element (Score_elem_info info)
{
- if (info.elem_l_->name() == Bar::static_name () && clef_type_str_)
+ if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i())
{
create_clef();
if (!clef_req_l_)
Scalar def = get_property ("defaultclef");
if (def)
set_type (def);
- if (clef_type_str_)
+ if (clef_type_str_.length_i ())
create_clef();
clef_p_->default_b_ = false;
}
parse_dimen (String dim)
{
int i=dim.length_i()-1;
- char const *s = dim;
+ char const *s = dim.ch_C ();
while (i > 0 && (isspace (s[i]) || isalpha (s[i])))
{
i--;