使用 ColdFusion 从字符串末尾删除设定数量的字符

发布于 2024-09-07 09:56:57 字数 260 浏览 1 评论 0原文

简单的请求(希望)在这里。

我有一个字符串,虽然长度不同,但总是需要删除最后 6 个字符。

使用第三方 Web 服务,因此我无法在输出之前编辑 XML 中的响应。

如果有人能建议一种快速修剪它们的方法,我将非常感激!

这是我将使用的字符串:

#daysEvent[iItem].XmlChildren[iEvent].XmlChildren[16].XmlText#

谢谢!

Simple request (hopefully) here.

I have a string which whilst it varies in length, will always need the last 6 characters removed.

Using a 3rd party web service, so I'm unable to edit the response in the XML before outputting.

If anyone can suggest a quick way of trimming them off i'd be really grateful!

here is the string i'll be using:

#daysEvent[iItem].XmlChildren[iEvent].XmlChildren[16].XmlText#

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千年*琉璃梦 2024-09-14 09:56:57
Left(mystring, len(mystring)-6)
Left(mystring, len(mystring)-6)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文