• <legend id='T3uDy'><style id='T3uDy'><dir id='T3uDy'><q id='T3uDy'></q></dir></style></legend>
      <bdo id='T3uDy'></bdo><ul id='T3uDy'></ul>

      1. <small id='T3uDy'></small><noframes id='T3uDy'>

      2. <tfoot id='T3uDy'></tfoot>

        <i id='T3uDy'><tr id='T3uDy'><dt id='T3uDy'><q id='T3uDy'><span id='T3uDy'><b id='T3uDy'><form id='T3uDy'><ins id='T3uDy'></ins><ul id='T3uDy'></ul><sub id='T3uDy'></sub></form><legend id='T3uDy'></legend><bdo id='T3uDy'><pre id='T3uDy'><center id='T3uDy'></center></pre></bdo></b><th id='T3uDy'></th></span></q></dt></tr></i><div id='T3uDy'><tfoot id='T3uDy'></tfoot><dl id='T3uDy'><fieldset id='T3uDy'></fieldset></dl></div>

        在javascript中将RTL字符串与LTR字符串连接起来

        Concat RTL string with LTR string in javascript(在javascript中将RTL字符串与LTR字符串连接起来)

        1. <small id='qzFmp'></small><noframes id='qzFmp'>

            <tfoot id='qzFmp'></tfoot>
            • <i id='qzFmp'><tr id='qzFmp'><dt id='qzFmp'><q id='qzFmp'><span id='qzFmp'><b id='qzFmp'><form id='qzFmp'><ins id='qzFmp'></ins><ul id='qzFmp'></ul><sub id='qzFmp'></sub></form><legend id='qzFmp'></legend><bdo id='qzFmp'><pre id='qzFmp'><center id='qzFmp'></center></pre></bdo></b><th id='qzFmp'></th></span></q></dt></tr></i><div id='qzFmp'><tfoot id='qzFmp'></tfoot><dl id='qzFmp'><fieldset id='qzFmp'></fieldset></dl></div>
                <tbody id='qzFmp'></tbody>
              <legend id='qzFmp'><style id='qzFmp'><dir id='qzFmp'><q id='qzFmp'></q></dir></style></legend>
                <bdo id='qzFmp'></bdo><ul id='qzFmp'></ul>

                  本文介绍了在javascript中将RTL字符串与LTR字符串连接起来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在将阿拉伯字符串与英文字符串连接时遇到了麻烦,但它们的顺序被弄乱了!

                  I'm facing trouble in concatenating Arabic string with English string but their order is being messed!

                  我尝试了 + 运算符和 str1.concat(..) 但对我没有用.

                  I tried + operator and str1.concat(..) but nothing works for me.

                  var a = 'english'
                  var b = '.-000082-13'
                  var c = '000004- -2014.xml'
                  
                  //var myCoolString =a + '\' + b + '\' + c;
                  
                  var myCoolString =a.concat("\",b,"\",c) 
                  
                  document.getElementsByTagName('output')[0].innerHTML = myCoolString;
                  

                  结果是这样的:english.-000082-1300004--2014.xml

                  The result was like this: english.-000082-1300004- -2014.xml

                  推荐答案

                  您要查找的字符是 u202Au202Bu202C

                  The characters your are looking for are u202A, u202B and u202C

                  function wrap_dir(dir, str) {
                      if (dir === 'rtl') return 'u202B' + str + 'u202C';
                      return 'u202A' + str + 'u202C';
                  }
                  
                  
                  wrap_dir('ltr', a) + wrap_dir('ltr', '\') + wrap_dir('rtl', b) + wrap_dir('ltr', '\') + wrap_dir('ltr', c);
                  // "english.-000082-13000004- -2014.xml"
                  

                  不知道为什么 c 想要成为 LTR,可能是因为它以 .xml 结尾?

                  Not sure why c wanted to be LTR, maybe because it ends .xml?

                  这篇关于在javascript中将RTL字符串与LTR字符串连接起来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Status Code:200 OK (from ServiceWorker)quot; in Chrome Network DevTools?(“状态码:200 OK(来自 ServiceWorker)在 Chrome 网络开发工具中?)
                  How to set a header for a HTTP GET request, and trigger file download?(如何为 HTTP GET 请求设置标头并触发文件下载?)
                  Adding custom HTTP headers using JavaScript(使用 JavaScript 添加自定义 HTTP 标头)
                  SQL Query DocumentDB in Azure Functions by an integer not working(通过整数在 Azure Functions 中 SQL 查询 DocumentDB 不起作用)
                  Azure Functions [JavaScript / Node.js] - HTTP call, good practices(Azure Functions [JavaScript/Node.js] - HTTP 调用,良好实践)
                  Azure Functions - Import Custom Node Module(Azure Functions - 导入自定义节点模块)
                      <bdo id='7rK5u'></bdo><ul id='7rK5u'></ul>
                          <tbody id='7rK5u'></tbody>

                      1. <small id='7rK5u'></small><noframes id='7rK5u'>

                          • <legend id='7rK5u'><style id='7rK5u'><dir id='7rK5u'><q id='7rK5u'></q></dir></style></legend>
                          • <i id='7rK5u'><tr id='7rK5u'><dt id='7rK5u'><q id='7rK5u'><span id='7rK5u'><b id='7rK5u'><form id='7rK5u'><ins id='7rK5u'></ins><ul id='7rK5u'></ul><sub id='7rK5u'></sub></form><legend id='7rK5u'></legend><bdo id='7rK5u'><pre id='7rK5u'><center id='7rK5u'></center></pre></bdo></b><th id='7rK5u'></th></span></q></dt></tr></i><div id='7rK5u'><tfoot id='7rK5u'></tfoot><dl id='7rK5u'><fieldset id='7rK5u'></fieldset></dl></div>

                            <tfoot id='7rK5u'></tfoot>