Redis String: STRLEN key
STRLEN key
Redis STRLEN command is used to get the length of the string value stored at key. An error is returned when key holds a non-string value.
Syntax:
redis 127.0.0.1:6379> STRLEN KEY_NAME
Available since
2.2.0.
Return Value
Integer reply, the length of the string at the key, or 0 when the key does not exist.
Return Value Type
Integer
Example: Redis STRLEN
redis 127.0.0.1:6379> SET key1 "Redis" OK redis 127.0.0.1:6379> STRLEN key1 (integer) 5
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework