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

Method add

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

Source from the content-addressed store, hash-verified

142 }
143
144 String add(const ArgRef& other) const
145 {
146 String s = toString();
147 if(isFloat(s)) {
148 return String(s.toFloat() + String(other).toFloat());
149 }
150 if(isNumber(s)) {
151 return String(s.toInt() + String(other).toInt());
152 }
153 return s + String(other);
154 }
155
156 String sub(const ArgRef& other) const
157 {

Callers 1

evaluateMethod · 0.45

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