MCPcopy Index your code
hub / github.com/ccxt/ccxt / addPadding

Method addPadding

java/tests/src/main/java/tests/exchange/TestMain.java:264–278  ·  view source on GitHub ↗
(Object message, Object size)

Source from the content-addressed store, hash-verified

262 }
263
264 public Object addPadding(Object message, Object size)
265 {
266 // has to be transpilable
267 Object res = "";
268 Object messageLength = ((String)message).length(); // avoid php transpilation issue
269 Object missingSpace = Helpers.subtract(Helpers.subtract(size, messageLength), 0); // - 0 is added just to trick transpile to treat the .length as a string for php
270 if (Helpers.isTrue(Helpers.isGreaterThan(missingSpace, 0)))
271 {
272 for (var i = 0; Helpers.isLessThan(i, missingSpace); i++)
273 {
274 res = Helpers.add(res, " ");
275 }
276 }
277 return Helpers.add(message, res);
278 }
279
280 public java.util.concurrent.CompletableFuture<Object> testMethod(Object methodName2, Exchange exchange, Object args, Object isPublic)
281 {

Callers 3

initInnerMethod · 0.95
testMethodMethod · 0.95
runTestsMethod · 0.95

Calls 6

subtractMethod · 0.95
isTrueMethod · 0.95
isGreaterThanMethod · 0.95
isLessThanMethod · 0.95
addMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected