Lines Matching refs:compare

20 // basic_string_view::compare
21 // int compare(const basic_string_view& str) const;
22 // int compare(size_type pos1, size_type n1, const basic_string_view& str) const;
23 // int compare(size_type pos1, size_type n1, const basic_string_view& str,
25 // int compare(const charT* s) const;
26 // int compare(size_type pos1, size_type n1,
29 // NB compare should be thought of as a lexographical compare, ie how
87 // int compare(const basic_string_view& str) const;
88 test_value(str_0.compare(str_1), gt); //because r>m
89 test_value(str_1.compare(str_0), lt); //because m<r
91 test_value(str_2.compare(str_0), z);
93 test_value(str_2.compare(str_0), lt);
95 test_value(str_2.compare(str_0), gt);
97 // int compare(size_type pos1, size_type n1, const basic_string_view& str) const;
98 test_value(str_1.compare(0, 6, str_0), lt);
100 test_value(str_1.compare(0, 4, str_2), z);
101 test_value(str_1.compare(0, 5, str_2), gt);
103 // int compare(size_type pos1, size_type n1, const basic_string_view& str,
105 test_value(str_1.compare(0, 6, str_0, 0, 6), z);
106 test_value(str_1.compare(0, 7, str_0, 0, 7), lt);
107 test_value(str_0.compare(0, 7, str_1, 0, 7), gt);
109 // int compare(const charT* s) const;
110 test_value(str_0.compare(L"costa marbella"), gt);
111 test_value(str_1.compare(L"costa rica"), lt);
113 test_value(str_2.compare(L"costa rica"), z);
114 test_value(str_2.compare(L"cost"), gt);
115 test_value(str_2.compare(L"costa ricans"), lt);
117 // int compare(size_type pos, size_type n1, const charT* str,
119 test_value(str_1.compare(0, 6, L"costa rica", 0, 6), z);
120 test_value(str_1.compare(0, 7, L"costa rica", 0, 7), lt);
121 test_value(str_0.compare(0, 7, L"costa marbella", 0, 7), gt);