如何使用enter | new line在Redis中设置键,例如
SET newkey "Text begins here
and ends here on the new line"
答案 0 :(得分:1)
您可以执行以下操作(例如使用Python):
In [1]: import redis
In [2]: r = redis.Redis()
In [3]: r.set('newkey', 'Text begins here\x0a\x0dand ends here on the new line')
Out[3]: True
In [4]: print r.get('newkey')
Text begins here
and ends here on the new line