strlen

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.strlen('key', function (err, length) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.strlenPromise('key')
  .then(length => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.strlen("key", new ResponseListener<Long>() {
  @Override
  public void onSuccess(int length) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $length = $kuzzle->memoryStorage()->strlen('key');
}
catch (ErrorException $e) {

}

Callback response:

13

Returns the length of a value stored at key.

[Redis documentation]


strlen(key, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to an integer containing the length of a value.