char[] templateText = txt.ToCharArray();
            
//ITemplate it = new CleanTemplate();

            List
<Tag> tags = new List<Tag>();
            
char[] temp = new char[100];

            
for (int i = 0; i < templateText.Length; i++)
            {
                
if (templateText[i] == '{')
                {
                    
if (i > 0 && templateText[i - 1== '\\')
                        
continue;

                    Tag tag 
= new Tag();
                    tag.StartIndex 
= i;
                    context.Response.Write(templateText[i]);

                    
while (++< templateText.Length && templateText[i] != '}')
                    {
                        
if (templateText[i] == ' ')
                        {
                            
if (isFirstSpace)
                            {
                                isFirstSpace 
= false;
                                context.Response.Write(
" ");
                            }
                            
continue;
                        }
                        context.Response.Write(templateText[i]);
                    }
                    tag.EndIndex 
= i;
                    context.Response.Write(templateText[i]);
                    context.Response.Write(
"<br />");
                }

                isFirstSpace 
= true;
            }

相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2021-07-25
  • 2022-02-01
  • 2021-12-24
  • 2021-07-29
  • 2022-12-23
猜你喜欢
  • 2021-08-17
  • 2022-01-08
  • 2022-12-23
  • 2021-07-13
  • 2021-06-18
  • 2021-11-17
  • 2021-12-07
相关资源
相似解决方案