gpt4 book ai didi

javascript - 解码带有百分比符号 (%HH) 的十六进制字符串

转载 作者:行者123 更新时间:2023-11-30 09:58:14 25 4
gpt4 key购买 nike

我需要从这里更改字符串:

Fast-9%20|%20Speed%20(Something-Cool)

对此:

Fast-9 | Speed (Something-Cool)

我如何在 NodeJS 中做到这一点?

最佳答案

引用decodeURIComponent

The decodeURIComponent() method decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine.

var str = 'Fast-9%20|%20Speed%20(Something-Cool)';
alert(decodeURIComponent(str));

关于javascript - 解码带有百分比符号 (%HH) 的十六进制字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32947384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com