@visulima/string
Version:
Functions for manipulating strings.
2 lines (1 loc) • 529 B
JavaScript
var f=Object.defineProperty;var a=(e,t)=>f(e,"name",{value:t,configurable:!0});import{R as l}from"./constants-CDcaCZKC.mjs";var c=Object.defineProperty,h=a((e,t)=>c(e,"name",{value:t,configurable:!0}),"l");const m=h((e,t)=>{const{length:i}=e;if(i===0)return"";if(i===1)return e[0];const r=[];let n="",o="";for(let s=0;s<i;s++){const u=e[s];if(l.test(u)){n?(r.push(n+o+u),n="",o=""):(r.length>0&&r.push(t),n=u);continue}n?(o&&(o+=t),o+=u):(r.length>0&&r.push(t),r.push(u))}return r.join("")},"joinSegments");export{m as default};