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

Method sub

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

Source from the content-addressed store, hash-verified

154 }
155
156 String sub(const ArgRef& other) const
157 {
158 String s = toString();
159 if(isFloat(s)) {
160 return String(s.toFloat() - other.toFloat());
161 }
162 if(isNumber(s)) {
163 return String(s.toInt() - other.toInt());
164 }
165 return s + String(other);
166 }
167
168 private:
169 SectionTemplate& tmpl;

Callers 7

conf.pyFile · 0.80
parse_peripheralsMethod · 0.80
fix_charclassFunction · 0.80
jsmin_for_posersFunction · 0.80
normaliseMethod · 0.80
parse_lineMethod · 0.80
evaluateMethod · 0.80

Calls 6

isFloatFunction · 0.85
isNumberFunction · 0.85
toStringFunction · 0.70
StringClass · 0.50
toFloatMethod · 0.45
toIntMethod · 0.45

Tested by

no test coverage detected