DXL - Unexpected character output -


i'm writing function replace substrings (what laguange doesn't have this, grr), , getting strange characters in ouput. cannot figure out why.

string replacesubstring(string input, string targetsubstring, string substitute, bool matchcase) {     string result = input     buffer b = create     b = input     int targetstartpos     int targetlength      while (findplaintext(result, targetsubstring, targetstartpos, targetlength, matchcase))     {         string prefixstr = b[0:targetstartpos - 1]         string suffixstr = b[targetstartpos + targetlength:]          b = prefixstr substitute suffixstr         result = tempstringof(b)     }      delete b     return result } 

when running print replacesubstring("jake lewis", "ake", "ack", false), output of �*��*�is. appear sort of encoding issue, unclear on how happening, or how fix it.

try using stringof() instead of tempstringof(). processing fine, result becomes invalid after deleting b.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -