This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Split a string into many string!
#4
Hi,

Use this:
Code:
str = 'Hold me tight or don't'
str = string.gsub(str, ''', "'")
log(str) -- Hold me tight or don't

Other metadata options are in this function:

Code:
function unescapemetadata(str)
    str = string.gsub( str, '%%3a', ':' )
    str = string.gsub( str, '%%2f', '/' )
    str = string.gsub( str, '&lt;', '<' )
    str = string.gsub( str, '&gt;', '>' )
    str = string.gsub( str, '&quot;', '"' )
    str = string.gsub( str, '&apos;', "'" )
    str = string.gsub( str, '&#(%d+);', function(n) return string.char(n) end )
    str = string.gsub( str, '&amp;', '&' ) -- Be sure to do this after all others
    return str
end

BR,

Erwin
Reply


Messages In This Thread
RE: Split a string into many string! - by Erwin van der Zwart - 01.12.2017, 18:05

Forum Jump: