string
英[str??] 美[str??]
n.String; rope, belt; thread, plant fiber; [Computer Science] string
vt. Wind, tune; line up in a row or series; tie, tie or hang with a thread; extend or extend
Third person singular: strings Plural: strings Present participle: stringing past tense: strung past participle: strung
length
英[le?θ] 美[le?θ]
n.Length, long; time length; (speech) sound length; a paragraph, a section
Plural: lengths
redis STRLEN command syntax
Function: Returns the length of the string value stored in key. When key stores a value other than a string value, an error is returned.
Syntax: STRLEN key
Available versions: >= 2.2.0
Time complexity: O(1)
Returns: The length of the string value. When key does not exist, return 0.
redis STRLEN command example
# 獲取字符串的長(zhǎng)度 redis> SET mykey "Hello world" OK redis> STRLEN mykey (integer) 11 # 不存在的 key 長(zhǎng)度為 0 redis> STRLEN nonexisting (integer) 0