为什么子串为"com".在GoogleScript中转换为“((类)") [英] Why substring "com." in GoogleScript convert to "(class)"
问题描述
今天,Google脚本已停止正常显示该行. 在出现行"com"的情况下.或"org". -子字符串被某个类(class)"代替.如何解决该问题?
Today, the Google script has stopped representing the line normally. In case of occurrence of a line "com." or "org." - substring is replaced by a certain class "(class)". How to fix the problem?
function myFunction2() {
var t = "testcom.io";
t = t + '1';
t=t;
}
编辑器的屏幕截图
记录器与您一样显示结果.但是在调试期间,变量T的值会更改.由于此错误,URL Feth不起作用.几个月前写了一个完整的脚本,直到今天一直有效.
The logger shows the result as well as you do. But during the debugging, the value of the variable T changes. Because of this error, URL Feth does not work. A full script was written a few months ago and worked until today.
您可以在下一张屏幕截图上查看错误.我们有var url ='api.intercom.io';;当我们尝试运行功能时,我们会看到
You can look error on the next screenshot. We have var url = 'api.intercom.io';; When we try run function we see
错误406
以及将var url更改为api.intercom.io';的消息.如果出现行"com".或组织". -子字符串被某个类(class)"或符号替换.
and message where var url is changed to api.intercom.io';. In case of occurrence of a line "com." or "org." - substring is replaced by a certain class "(class)" or symbols .
function myFunction3() {
var url = 'https://api.intercom.io';
var response = UrlFetchApp.fetch(url,options);
Logger.log(response.getContentText());
}
查看
推荐答案
我认为test(class)
不是t
的值,而是该特定t变量所属的类.
I think that test(class)
is not the value of t
rather that's the class to which this particular t variable belongs.
您可以将函数转换为以下形式:
You can turn your function into something like this :
然后检查日志以查看t的值
Then check the log to see value of t
如果您需要其他帮助,请告诉我.
Let me know if you need anymore help.
这篇关于为什么子串为"com".在GoogleScript中转换为“((类)")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!