MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / string

Class string

subprojects/llama.cpp/common/jinja/string.h:24–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22};
23
24struct string {
25 std::vector<string_part> parts;
26 string() = default;
27 string(const std::string & v, bool user_input = false) {
28 parts.push_back({user_input, v});
29 }
30 string(int v) {
31 parts.push_back({false, std::to_string(v)});
32 }
33 string(double v) {
34 parts.push_back({false, std::to_string(v)});
35 }
36
37 // mark all parts as user input
38 void mark_input();
39
40 std::string str() const;
41 size_t length() const;
42 void hash_update(hasher & hash) const noexcept;
43 bool all_parts_are_input() const;
44 bool is_uppercase() const;
45 bool is_lowercase() const;
46
47 // mark this string as input if other has ALL parts as input
48 void mark_input_based_on(const string & other);
49
50 string append(const string & other);
51
52 // in-place transformations
53
54 string uppercase();
55 string lowercase();
56 string capitalize();
57 string titlecase();
58 string strip(bool left, bool right, std::optional<const std::string_view> chars = std::nullopt);
59};
60
61} // namespace jinja

Callers 15

getJniResultFunction · 0.85
setIntFieldFunction · 0.85
setStringFieldFunction · 0.85
new_jstring_utf8Function · 0.85
build_v_diffMethod · 0.85
compute_piterFunction · 0.85
get_kv_strFunction · 0.85
string_formatFunction · 0.85
get_stringMethod · 0.85
mtmd_contextMethod · 0.85
add_mediaMethod · 0.85

Calls

no outgoing calls

Tested by 15

assert_throwsFunction · 0.68
test_reasoningFunction · 0.68
mainFunction · 0.68
indentMethod · 0.68
mainFunction · 0.68
mainFunction · 0.68
test_example_qwen3_coderFunction · 0.68