V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
qwerthhusn
V2EX  ›  Redis

redis-cli 执行 set a "你好",执行 strlen a 得到几???

  •  
  •   qwerthhusn · 2019-11-19 14:55:21 +08:00 · 9899 次点击
    这是一个创建于 1592 天前的主题,其中的信息可能已经有所发展或是发生改变。

    A. 2 B. 4 C. 6 D. 8

    别去敲命令

    你真的了解 redis 的“字符串”?

    1 条回复    2020-02-19 21:21:25 +08:00
    maxint
        1
    maxint  
       2020-02-19 21:21:25 +08:00
    这和你用的客户端有关,你的客户端把『你好』编码成几个字节就是几个字节
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4443 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:03 · PVG 18:03 · LAX 03:03 · JFK 06:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.