Avoid " , " in strings - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Avoid " , " in strings (/Thread-Avoid-in-strings) |
Avoid " , " in strings - rastrero - 09-21-2016 02:43 AM HI guys. I got a system that need to compare long text string. The problem is thoose strings contains " ; " and break STRCMP For example IF !(STRCMP(<local.text1>, <local.text2>)) Local.text1= Robert, bla bla bla. Local.text2= bla bla bla , bla bla bla I want sphere to ignore this " , " so STRCMP will correctly work. Any idea about how to resolve this without editing source? Maybe source should be fixed to ignore " , " that are not betwen spaces? This way "robert, bla bla" will not break the function STRCMP thx RE: Avoid " , " in strings - Kanibal - 09-21-2016 04:37 AM Have you tried this? Code: IF !(STRCMP("<local.text1>", "<local.text2>")) RE: Avoid " , " in strings - rastrero - 09-21-2016 05:19 AM I´ll try. Thx RE: Avoid " , " in strings - Llirik - 09-21-2016 08:39 AM Use this: if strmatch("<local.text1>","<local.text2>") bla, bla, bla endif RE: Avoid " , " in strings - rastrero - 09-25-2016 05:25 AM works fine. ty budys |