当前位置: 首页>>代码示例>>C++>>正文


C++ ustring::append方法代码示例

本文整理汇总了C++中ustring::append方法的典型用法代码示例。如果您正苦于以下问题:C++ ustring::append方法的具体用法?C++ ustring::append怎么用?C++ ustring::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ustring的用法示例。


在下文中一共展示了ustring::append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: string_append_line

void string_append_line(ustring & container, const ustring & line)
{
  if (!container.empty()) {
    container.append("\n");
  }
  container.append(line);
}
开发者ID:postiffm,项目名称:bibledit-gtk,代码行数:7,代码来源:utilities.cpp

示例2: bibleworks_define_parsing_conjunction_suffix

void bibleworks_define_parsing_conjunction_suffix (ustring& parsing, ustring& definition)
// Parse the suffix of the conjunction.
{
  if (parsing == "c")
    definition.append (" contracted");
  if (parsing == "n")
    definition.append (" not contracted");
}
开发者ID:alerque,项目名称:bibledit,代码行数:8,代码来源:bibleworks.cpp

示例3: bibleworks_define_parsing_particle_suffix

void bibleworks_define_parsing_particle_suffix (ustring& parsing, ustring& definition)
// Parse the suffix of the particle.
{
  if (parsing == "i")
    definition.append (" interrogative");
  if (parsing == "n")
    definition.append (" negative");
  if (parsing == "o")
    definition.append (" other");
}
开发者ID:alerque,项目名称:bibledit,代码行数:10,代码来源:bibleworks.cpp

示例4: bibleworks_define_parsing_adjective_suffix

void bibleworks_define_parsing_adjective_suffix (ustring& parsing, ustring& definition)
// Parse the suffix of the adjective.
{
  if (parsing == "c")
    definition.append (" comparative");
  if (parsing == "s")
    definition.append (" superlative");
  if (parsing == "n")
    definition.append (" no degree");
}
开发者ID:alerque,项目名称:bibledit,代码行数:10,代码来源:bibleworks.cpp

示例5: bibleworks_define_parsing_adverb_suffix

void bibleworks_define_parsing_adverb_suffix (ustring& parsing, ustring& definition)
// Parse the suffix of the adverb.
{
  if (parsing == "c")
    definition.append (" comparative");
  if (parsing == "s")
    definition.append (" superlative");
  if (parsing == "i")
    definition.append (" interrogative");
  if (parsing == "n")
    definition.append (" normal");
}
开发者ID:alerque,项目名称:bibledit,代码行数:12,代码来源:bibleworks.cpp

示例6: notes_read_one_from_file

void notes_read_one_from_file (int id, ustring& note, ustring& project, ustring& references, ustring& category, int& date_created, ustring& user_created, int& date_modified, ustring& logbook)
{
    note.clear();
    logbook.clear();
    ustring filename = notes_file_name (id);
    ReadText rt (filename, true, false);
    bool logbook_indicator_encountered = false;
    for (unsigned int i = 0; i < rt.lines.size(); i++) {
        ustring line = rt.lines[i];
        if (i == 0) {
            // Retrieve date created.
            date_created = convert_to_int (line);
        }
        else if (i == 1) {
            // Retrieve user who created it.
            user_created = line;
        }
        else if (i == 2) {
            // Retrieve references.
            references = line;
        }
        else if (i == 3) {
            // Retrieve category.
            category = line;
        }
        else if (i == 4) {
            // Retrieve project.
            project = line;
        }
        else if (i == 5) {
            // Retrieve date modified.
            date_modified = convert_to_int (line);
        }
        else if (line == notes_logbook_line ()) {
            logbook_indicator_encountered = true;
        }
        else {
            if (logbook_indicator_encountered) {
                if (!logbook.empty()) logbook.append ("\n");
                logbook.append (line);
            } else {
                if (!note.empty()) note.append ("\n");
                note.append (line);
            }
        }
    }
    note = trim (note);
    logbook = trim (logbook);
}
开发者ID:postiffm,项目名称:bibledit-gtk,代码行数:49,代码来源:notes_utils.cpp

示例7: bibleworks_define_parsing_gender

void bibleworks_define_parsing_gender (ustring& parsing, ustring& definition)
// Parse the gender.
{
  ustring gender_code = parsing.substr (0, 1);
  parsing.erase (0, 1);
  if (gender_code == "m") {
    definition.append (" masculine");
  } 
  if (gender_code == "f") {
    definition.append (" feminine");
  }
  if (gender_code == "n") {
    definition.append (" neuter");
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:15,代码来源:bibleworks.cpp

示例8: compress_ensure_zip_suffix

void compress_ensure_zip_suffix (ustring& filename)
// Ensure that "filename" has the ".zip" suffix.
{
  if (!g_str_has_suffix (filename.c_str(), ".zip")) {
    filename.append (".zip");
  }
}
开发者ID:postiffm,项目名称:bibledit-gtk,代码行数:7,代码来源:compress.cpp

示例9: bibleworks_define_parsing_number

void bibleworks_define_parsing_number (ustring& parsing, ustring& definition)
// Parse the number.
{
  ustring number = parsing.substr (0, 1);
  bool remove_code = true;
  if (number == "s") {
    definition.append (" singular");
  } else if (number == "p") {
    definition.append (" plural");
  } else {
    remove_code = false;
  }
  if (remove_code) {
    parsing.erase (0, 1);
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:16,代码来源:bibleworks.cpp

示例10: save

void ExportParatextStylesheet::save (ustring filename)
{
  // Write the stylesheet to file.
  if (!g_str_has_suffix (filename.c_str(), ".sty")) {
    filename.append (".sty");
  }
  write_lines (filename, stylesheet_lines);
}
开发者ID:postiffm,项目名称:bibledit-gtk,代码行数:8,代码来源:paratext.cpp

示例11: bibleworks_define_parsing_person

void bibleworks_define_parsing_person (ustring& parsing, ustring& definition)
// This looks in the "parsing" whether the person is given. 
// If so, it adds the description to the "definition" and removes the relevant code from the "parsing".
{
  ustring person = parsing.substr (0, 1);
  bool person_found = true;
  if (person == "1") {
    definition.append (" first person");
  } else if (person == "2") {
    definition.append (" second person");
  } else if (person == "3") {
    definition.append (" third person");
  } else {
    person_found = false;
  }
  if (person_found) {
    parsing.erase (0, 1);
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:19,代码来源:bibleworks.cpp

示例12: bibleworks_define_parsing_case

void bibleworks_define_parsing_case (ustring& parsing, ustring& definition)
// Parse the case.
{
  ustring case_code = parsing.substr (0, 1);
  parsing.erase (0, 1);
  if (case_code == "n") {
    definition.append (" nominative");
  } 
  if (case_code == "g") {
    definition.append (" genitive");
  }
  if (case_code == "d") {
    definition.append (" dative");
  }
  if (case_code == "a") {
    definition.append (" accusative");
  }
  if (case_code == "v") {
    definition.append (" vocative");
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:21,代码来源:bibleworks.cpp

示例13: bibleworks_define_parsing_pronoun

void bibleworks_define_parsing_pronoun (ustring& parsing, ustring& definition)
// Parse the extra bits of the pronoun.
{
  ustring code = parsing.substr (0, 1);
  parsing.erase (0, 1);
  if (code == "r") {
    definition.append (" relative");
  }
  if (code == "e") {
    definition.append (" reciprocal");
  }
  if (code == "d") {
    definition.append (" demonstrative");
  }
  if (code == "c") {
    definition.append (" correlative");
  } 
  if (code == "q") {
    definition.append (" interrogative");
  }
  if (code == "i") {
    definition.append (" indefinite");
  }
  if (code == "o") {
    definition.append (" correlative/interrogative");
  }
  if (code == "x") {
    definition.append (" reflexive");
  }
  if (code == "s") {
    definition.append (" possessive");
  }
  if (code == "p") {
    definition.append (" personal");
  }
}
开发者ID:alerque,项目名称:bibledit,代码行数:36,代码来源:bibleworks.cpp

示例14: bibleworks_define_parsing_voice

void bibleworks_define_parsing_voice (ustring& parsing, ustring& definition)
// Parse the voice of verbs.
{
  ustring voice = parsing.substr (0, 1);  
  parsing.erase (0, 1);
  if (voice == "a")
    definition.append (" active");
  if (voice == "m")
    definition.append (" middle");
  if (voice == "p")
    definition.append (" passive");
  if (voice == "e")
    definition.append (" middle or passive");
  if (voice == "d")
    definition.append (" middle deponent");
  if (voice == "o")
    definition.append (" passive deponent");
  if (voice == "n")
    definition.append (" middle or passive deponent");
  if (voice == "q")
    definition.append (" impersonal active");
  if (voice == "x")
    definition.append (" no voice stated");
}
开发者ID:alerque,项目名称:bibledit,代码行数:24,代码来源:bibleworks.cpp

示例15: bibleworks_define_parsing_indeclinable_form_suffix

void bibleworks_define_parsing_indeclinable_form_suffix (ustring& parsing, ustring& definition)
// Parse the suffix of the indeclinable form.
{
  if (parsing == "a")
    definition.append (" Aramaic word");
  if (parsing == "h")
    definition.append (" Hebrew word");
  if (parsing == "p")
    definition.append (" indeclinable noun");
  if (parsing == "n")
    definition.append (" indeclinable numeral");
  if (parsing == "l")
    definition.append (" indeclinable letter");
  if (parsing == "o")
    definition.append (" indeclinable other");
}
开发者ID:alerque,项目名称:bibledit,代码行数:16,代码来源:bibleworks.cpp


注:本文中的ustring::append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。