Cloud Firestore是否使用换行符\ n字符(多行)保存字符串? [英] Does Cloud Firestore save strings with newline \n characters (multiline)?

查看:40
本文介绍了Cloud Firestore是否使用换行符\ n字符(多行)保存字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,Cloud Firestore控制台在字符串内不显示换行符.有没有办法检查它们?

Apparently Cloud Firestore console does not display newline characters inside strings. Is there a way to inspect them?

此保存的字符串实际上是:

问题

即使在Firestore控制台上看不到换行符,我也可以确保它们在那里吗?

Can I be sure that the newlines are there, even though they're not visible on the Firestore Console?

推荐答案

字符串未修改地存储,但是Firestore控制台的各个部分以不同的方式显示换行符.另请参阅我以前在 Firebase Firestore新行命令上的答案和Doug在这里的答案:新行命令(\ n)无法与Firebase Firestore一起使用数据库字符串.

Strings are stored unmodified, but various parts of the Firestore console show the newline character in different ways. Also see my previous answer on Firebase Firestore new line command and Doug's answer here: New Line Command (\n) Not Working With Firebase Firestore Database Strings.

由于此行为使您感到困惑,因此请提交错误报告.但是请放心:您的换行符可以正确存储和读取.

Since the behavior is confusing to you, please file a bug report. But rest assured: your newline characters are stored and read correctly.

这篇关于Cloud Firestore是否使用换行符\ n字符(多行)保存字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆