MCPcopy Create free account
hub / github.com/SmingHub/Sming / compare

Method compare

Sming/Core/Data/Stream/SectionTemplate.cpp:133–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 int compare(const ArgRef& other) const
134 {
135 String s1 = toString();
136 String s2 = other.toString();
137 if(isNumber(s1.c_str())) {
138 return s1.toInt() - s2.toInt();
139 } else {
140 return s1.compareTo(s2);
141 }
142 }
143
144 String add(const ArgRef& other) const
145 {

Callers 1

evaluateMethod · 0.45

Calls 6

isNumberFunction · 0.85
toStringFunction · 0.70
toStringMethod · 0.45
c_strMethod · 0.45
toIntMethod · 0.45
compareToMethod · 0.45

Tested by

no test coverage detected