How to write the Extension method for my View using jquery or javascript
I have a output string something like this
开发者_开发技巧<*>$<@>%<#
I need a extension method for this string as Input
and I need to ass a Space after each > < simbol.
Ouput should be
< *> $< @> %< #
i need to out put something like this. I need to make sure allways one Space after < > symbol..
Ex: if I get something like this as input < $ i need to leave it as it is...only one space need to be added.
Can any body help me out how to do this?
thanks in advance
public static string KumarsExtension(this string input)
{
return input.Replace(">", "> ").Replace("<", "< ");
}
精彩评论