- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - String Strlen Command
Redis STRLEN command is used to get the length of the string value stored at the key. An error is returned when the key holds a non-string value.
Return Value
Integer reply, the length of the string at the key, or 0 when the key does not exist.
Syntax
Following is the basic syntax of Redis SETRANGE command.
redis 127.0.0.1:6379> STRLEN KEY_NAME
Example
redis 127.0.0.1:6379> SET key1 "Hello World" OK redis 127.0.0.1:6379> STRLEN key1 (integer) 11 redis 127.0.0.1:6379> STRLEN key2 (integer) 0
redis_strings.htm
Advertisements