#19235: Fixing possible multi-threading issues when striping characters from string.
#19235: Fixing possible multi-threading issues when striping characters from string.

This happened to be the reason for scripts/stylesheets not being included in the correct order sometimes. Char array passed might get corrupted when multiple string replacements were done in parallel, making the resulting string incorrect.
This method is most commonly used during shape name and alternate generation for resources, hence the issues.

Work Item: 19235

abhishekluv/Orchard,dcinzona/Orchard,Sylapse/Orchard.HttpAuthSample,bigfont/orchard-cms-modules-and-themes,andyshao/Orchard,openbizgit/Orchard,qt1/orchard4ibn,fassetar/Orchard,emretiryaki/Orchard,mgrowan/Orchard,dozoft/Orchard,KeithRaven/Orchard,tobydodds/folklife,vairam-svs/Orchard,aaronamm/Orchard,oxwanawxo/Orchard,mvarblow/Orchard,gcsuk/Orchard,TaiAivaras/Orchard,dozoft/Orchard,salarvand/orchard,infofromca/Orchard,harmony7/Orchard,arminkarimi/Orchard,fassetar/Orchard,gcsuk/Orchard,SeyDutch/Airbrush,KeithRaven/Orchard,jchenga/Orchard,patricmutwiri/Orchard,smartnet-developers/Orchard,fortunearterial/Orchard,ericschultz/outercurve-orchard,grapto/Orchard.CloudBust,kouweizhong/Orchard,stormleoxia/Orchard,escofieldnaxos/Orchard,austinsc/Orchard,asabbott/chicagodevnet-website,vard0/orchard.tan,dcinzona/Orchard,tobydodds/folklife,huoxudong125/Orchard,Dolphinsimon/Orchard,xiaobudian/Orchard,stormleoxia/Orchard,MetSystem/Orchard,yonglehou/Orchard,marcoaoteixeira/Orchard,hbulzy/Orchard,RoyalVeterinaryCollege/Orchard,JRKelso/Orchard,kouweizhong/Orchard,luchaoshuai/Orchard,cooclsee/Orchard,TalaveraTechnologySolutions/Orchard,brownjordaninternational/OrchardCMS,RoyalVeterinaryCollege/Orchard,vairam-svs/Orchard,jtkech/Orchard,AdvantageCS/Orchard,omidnasri/Orchard,li0803/Orchard,Ermesx/Orchard,huoxudong125/Orchard,jimasp/Orchard,AdvantageCS/Orchard,yonglehou/Orchard,li0803/Orchard,tobydodds/folklife,jagraz/Orchard,AndreVolksdorf/Orchard,yonglehou/Orchard,grapto/Orchard.CloudBust,luchaoshuai/Orchard,sfmskywalker/Orchard-Off-The-Grid-Sample-Code,grapto/Orchard.CloudBust,TalaveraTechnologySolutions/Orchard,OrchardCMS/Orchard-Harvest-Website,dcinzona/Orchard-Harvest-Website,abhishekluv/Orchard,rtpHarry/Orchard,cooclsee/Orchard,jimasp/Orchard,arminkarimi/Orchard,AdvantageCS/Orchard,patricmutwiri/Orchard,Praggie/Orchard,Codinlab/Orchard,austinsc/Orchard,JRKelso/Orchard,fortunearterial/Orchard,kgacova/Orchard,SeyDutch/Airbrush,luchaoshuai/Orchard,DonnotRain/Orchard,bigfont/orchard-cms-modules-and-themes,NIKASoftwareDevs/Orchard,m2cms/Orchard,xiaobudian/Orchard,mvarblow/Orchard,salarvand/orchard,oxwanawxo/Orchard,xiaobudian/Orchard,dburriss/Orchard,fassetar/Orchard,spraiin/Orchard,openbizgit/Orchard,oxwanawxo/Orchard,emretiryaki/Orchard,jagraz/Orchard,aaronamm/Orchard,ehe888/Orchard,hbulzy/Orchard,bigfont/orchard-cms-modules-and-themes,austinsc/Orchard,alejandroaldana/Orchard,TalaveraTechnologySolutions/Orchard,fortunearterial/Orchard,kouweizhong/Orchard,m2cms/Orchard,geertdoornbos/Orchard,vard0/orchard.tan,stormleoxia/Orchard,princeppy/JPYSites-Orchard-Azure-Live-SourceCode,dozoft/Orchard,KeithRaven/Orchard,huoxudong125/Orchard,vairam-svs/Orchard,oxwanawxo/Orchard,AEdmunds/beautiful-springtime,hhland/Orchard,dmitry-urenev/extended-orchard-cms-v10.1,andyshao/Orchard,bigfont/orchard-cms-modules-and-themes,arminkarimi/Orchard,JRKelso/Orchard,geertdoornbos/Orchard,patricmutwiri/Orchard,angelapper/Orchard,Ermesx/Orchard,MetSystem/Orchard,AEdmunds/beautiful-springtime,Lombiq/Orchard,Praggie/Orchard,OrchardCMS/Orchard-Harvest-Website,sfmskywalker/Orchard-Off-The-Grid-Sample-Code,qt1/Orchard,OrchardCMS/Orchard-Harvest-Website,AndreVolksdorf/Orchard,xkproject/Orchard,omidnasri/Orchard,hbulzy/Orchard,marcoaoteixeira/Orchard,AndreVolksdorf/Orchard,escofieldnaxos/Orchard,sfmskywalker/Orchard,luchaoshuai/Orchard,geertdoornbos/Orchard,enspiral-dev-academy/Orchard,jersiovic/Orchard,Serlead/Orchard,neTp9c/Orchard,xkproject/Orchard,li0803/Orchard,enspiral-dev-academy/Orchard,harmony7/Orchard,arminkarimi/Orchard,gcsuk/Orchard,xkproject/Orchard,enspiral-dev-academy/Orchard,marcoaoteixeira/Orchard,kgacova/Orchard,Inner89/Orchard,jtkech/Orchard,Codinlab/Orchard,tobydodds/folklife,princeppy/JPYSites-Orchard-Azure-Live-SourceCode,vairam-svs/Orchard,dmitry-urenev/extended-orchard-cms-v10.1,omidnasri/Orchard,OrchardCMS/Orchard,johnnyqian/Orchard,mvarblow/Orchard,spraiin/Orchard,OrchardCMS/Orchard,Sylapse/Orchard.HttpAuthSample,DonnotRain/Orchard,ericschultz/outercurve-orchard,Praggie/Orchard,ericschultz/outercurve-orchard,jaraco/orchard,JRKelso/Orchard,Dolphinsimon/Orchard,emretiryaki/Orchard,arminkarimi/Orchard,angelapper/Orchard,austinsc/Orchard,yonglehou/Orchard,Anton-Am/Orchard,Ermesx/Orchard,asabbott/chicagodevnet-website,marcoaoteixeira/Orchard,OrchardCMS/Orchard-Harvest-Website,SzymonSel/Orchard,planetClaire/Orchard-LETS,armanforghani/Orchard,smartnet-developers/Orchard,yonglehou/Orchard,omidnasri/Orchard,Serlead/Orchard,SeyDutch/Airbrush,oxwanawxo/Orchard,IDeliverable/Orchard,salarvand/orchard,alejandroaldana/Orchard,RoyalVeterinaryCollege/Orchard,armanforghani/Orchard,jerryshi2007/Orchard,OrchardCMS/Orchard-Harvest-Website,DonnotRain/Orchard,jaraco/orchard,SouleDesigns/SouleDesigns.Orchard,salarvand/Portal,hannan-azam/Orchard,princeppy/JPYSites-Orchard-Azure-Live-SourceCode,sebastienros/msc,SouleDesigns/SouleDesigns.Orchard,m2cms/Orchard,alejandroaldana/Orchard,dozoft/Orchard,spraiin/Orchard,Serlead/Orchard,huoxudong125/Orchard,salarvand/Portal,bedegaming-aleksej/Orchard,omidnasri/Orchard,Inner89/Orchard,omidnasri/Orchard,Fogolan/OrchardForWork,cooclsee/Orchard,jersiovic/Orchard,yersans/Orchard,bigfont/orchard-continuous-integration-demo,dcinzona/Orchard-Harvest-Website,armanforghani/Orchard,jimasp/Orchard,vairam-svs/Orchard,sebastienros/msc,TalaveraTechnologySolutions/Orchard,brownjordaninternational/OrchardCMS,SeyDutch/Airbrush,jersiovic/Orchard,qt1/Orchard,openbizgit/Orchard,johnnyqian/Orchard,DonnotRain/Orchard,kouweizhong/Orchard,Cphusion/Orchard,smartnet-developers/Orchard,jagraz/Orchard,dmitry-urenev/extended-orchard-cms-v10.1,Cphusion/Orchard,Fogolan/OrchardForWork,bedegaming-aleksej/Orchard,vard0/orchard.tan,stormleoxia/Orchard,Inner89/Orchard,abhishekluv/Orchard,Serlead/Orchard,m2cms/Orchard,SzymonSel/Orchard,omidnasri/Orchard,abhishekluv/Orchard,bedegaming-aleksej/Orchard,Sylapse/Orchard.HttpAuthSample,hannan-azam/Orchard,dcinzona/Orchard-Harvest-Website,Fogolan/OrchardForWork,Morgma/valleyviewknolls,hhland/Orchard,Serlead/Orchard,LaserSrl/Orchard,ericschultz/outercurve-orchard,qt1/orchard4ibn,Codinlab/Orchard,dburriss/Orchard,RoyalVeterinaryCollege/Orchard,phillipsj/Orchard,Inner89/Orchard,jagraz/Orchard,huoxudong125/Orchard,yersans/Orchard,sfmskywalker/Orchard,mgrowan/Orchard,rtpHarry/Orchard,Cphusion/Orchard,MpDzik/Orchard,brownjordaninternational/OrchardCMS,alejandroaldana/Orchard,MpDzik/Orchard,mgrowan/Orchard,jaraco/orchard,gcsuk/Orchard,Ermesx/Orchard,stormleoxia/Orchard,rtpHarry/Orchard,rtpHarry/Orchard,AdvantageCS/Orchard,SzymonSel/Orchard,luchaoshuai/Orchard,li0803/Orchard,princeppy/JPYSites-Orchard-Azure-Live-SourceCode,yersans/Orchard,dcinzona/Orchard,Codinlab/Orchard,Sylapse/Orchard.HttpAuthSample,Dolphinsimon/Orchard,IDeliverable/Orchard,abhishekluv/Orchard,NIKASoftwareDevs/Orchard,infofromca/Orchard,TalaveraTechnologySolutions/Orchard,sfmskywalker/Orchard,bigfont/orchard-continuous-integration-demo,Fogolan/OrchardForWork,escofieldnaxos/Orchard,phillipsj/Orchard,yersans/Orchard,MetSystem/Orchard,Sylapse/Orchard.HttpAuthSample,AndreVolksdorf/Orchard,jchenga/Orchard,hhland/Orchard,andyshao/Orchard,AdvantageCS/Orchard,grapto/Orchard.CloudBust,Dolphinsimon/Orchard,neTp9c/Orchard,TaiAivaras/Orchard,mvarblow/Orchard,spraiin/Orchard,jchenga/Orchard,IDeliverable/Orchard,neTp9c/Orchard,spraiin/Orchard,fortunearterial/Orchard,LaserSrl/Orchard,jerryshi2007/Orchard,hhland/Orchard,planetClaire/Orchard-LETS,planetClaire/Orchard-LETS,TalaveraTechnologySolutions/Orchard,patricmutwiri/Orchard,jerryshi2007/Orchard,infofromca/Orchard,m2cms/Orchard,bedegaming-aleksej/Orchard,planetClaire/Orchard-LETS,johnnyqian/Orchard,li0803/Orchard,xkproject/Orchard,LaserSrl/Orchard,alejandroaldana/Orchard,hannan-azam/Orchard,andyshao/Orchard,brownjordaninternational/OrchardCMS,dmitry-urenev/extended-orchard-cms-v10.1,AEdmunds/beautiful-springtime,brownjordaninternational/OrchardCMS,LaserSrl/Orchard,jersiovic/Orchard,angelapper/Orchard,mgrowan/Orchard,neTp9c/Orchard,sebastienros/msc,SouleDesigns/SouleDesigns.Orchard,rtpHarry/Orchard,sfmskywalker/Orchard-Off-The-Grid-Sample-Code,infofromca/Orchard,KeithRaven/Orchard,OrchardCMS/Orchard-Harvest-Website,fassetar/Orchard,Anton-Am/Orchard,Morgma/valleyviewknolls,fassetar/Orchard,kgacova/Orchard,qt1/Orchard,ehe888/Orchard,hhland/Orchard,geertdoornbos/Orchard,bigfont/orchard-cms-modules-and-themes,qt1/orchard4ibn,SouleDesigns/SouleDesigns.Orchard,IDeliverable/Orchard,jerryshi2007/Orchard,Lombiq/Orchard,MpDzik/Orchard,SzymonSel/Orchard,ehe888/Orchard,dburriss/Orchard,OrchardCMS/Orchard,johnnyqian/Orchard,dcinzona/Orchard-Harvest-Website,ehe888/Orchard,SzymonSel/Orchard,jchenga/Orchard,geertdoornbos/Orchard,jerryshi2007/Orchard,SeyDutch/Airbrush,jaraco/orchard,harmony7/Orchard,patricmutwiri/Orchard,angelapper/Orchard,cooclsee/Orchard,omidnasri/Orchard,SouleDesigns/SouleDesigns.Orchard,sebastienros/msc,harmony7/Orchard,Cphusion/Orchard,xiaobudian/Orchard,AndreVolksdorf/Orchard,sfmskywalker/Orchard,tobydodds/folklife,TalaveraTechnologySolutions/Orchard,omidnasri/Orchard,andyshao/Orchard,MetSystem/Orchard,Dolphinsimon/Orchard,emretiryaki/Orchard,hannan-azam/Orchard,Fogolan/OrchardForWork,qt1/Orchard,openbizgit/Orchard,phillipsj/Orchard,TaiAivaras/Orchard,sfmskywalker/Orchard,grapto/Orchard.CloudBust,vard0/orchard.tan,sebastienros/msc,abhishekluv/Orchard,jagraz/Orchard,TaiAivaras/Orchard,escofieldnaxos/Orchard,salarvand/Portal,dcinzona/Orchard,sfmskywalker/Orchard,smartnet-developers/Orchard,TaiAivaras/Orchard,NIKASoftwareDevs/Orchard,NIKASoftwareDevs/Orchard,fortunearterial/Orchard,princeppy/JPYSites-Orchard-Azure-Live-SourceCode,phillipsj/Orchard,IDeliverable/Orchard,escofieldnaxos/Orchard,aaronamm/Orchard,Codinlab/Orchard,tobydodds/folklife,qt1/Orchard,jtkech/Orchard,Ermesx/Orchard,enspiral-dev-academy/Orchard,armanforghani/Orchard,Morgma/valleyviewknolls,qt1/orchard4ibn,jchenga/Orchard,dcinzona/Orchard-Harvest-Website,jtkech/Orchard,Anton-Am/Orchard,dozoft/Orchard,xkproject/Orchard,austinsc/Orchard,jersiovic/Orchard,asabbott/chicagodevnet-website,xiaobudian/Orchard,smartnet-developers/Orchard,TalaveraTechnologySolutions/Orchard,Lombiq/Orchard,Lombiq/Orchard,gcsuk/Orchard,johnnyqian/Orchard,angelapper/Orchard,asabbott/chicagodevnet-website,yersans/Orchard,OrchardCMS/Orchard,bigfont/orchard-continuous-integration-demo,MpDzik/Orchard,JRKelso/Orchard,neTp9c/Orchard,openbizgit/Orchard,Praggie/Orchard,bigfont/orchard-continuous-integration-demo,AEdmunds/beautiful-springtime,dcinzona/Orchard,marcoaoteixeira/Orchard,Morgma/valleyviewknolls,MpDzik/Orchard,harmony7/Orchard,kgacova/Orchard,qt1/orchard4ibn,infofromca/Orchard,Anton-Am/Orchard,sfmskywalker/Orchard,salarvand/Portal,hbulzy/Orchard,grapto/Orchard.CloudBust,kgacova/Orchard,Lombiq/Orchard,jimasp/Orchard,phillipsj/Orchard,qt1/orchard4ibn,mvarblow/Orchard,MetSystem/Orchard,OrchardCMS/Orchard,armanforghani/Orchard,NIKASoftwareDevs/Orchard,mgrowan/Orchard,sfmskywalker/Orchard-Off-The-Grid-Sample-Code,dcinzona/Orchard-Harvest-Website,jtkech/Orchard,planetClaire/Orchard-LETS,hbulzy/Orchard,LaserSrl/Orchard,aaronamm/Orchard,Inner89/Orchard,Anton-Am/Orchard,Morgma/valleyviewknolls,kouweizhong/Orchard,dburriss/Orchard,Cphusion/Orchard,DonnotRain/Orchard,jimasp/Orchard,emretiryaki/Orchard,salarvand/orchard,RoyalVeterinaryCollege/Orchard,sfmskywalker/Orchard,vard0/orchard.tan,aaronamm/Orchard,dmitry-urenev/extended-orchard-cms-v10.1,ehe888/Orchard,hannan-azam/Orchard,KeithRaven/Orchard,salarvand/Portal,dburriss/Orchard,sfmskywalker/Orchard-Off-The-Grid-Sample-Code,vard0/orchard.tan,salarvand/orchard,Praggie/Orchard,bedegaming-aleksej/Orchard,cooclsee/Orchard,enspiral-dev-academy/Orchard,MpDzik/Orchard