Matched whitespace matching with Regexp and added warning about $ when calling 
substitute


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5d7d2699
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5d7d2699
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5d7d2699

Branch: refs/heads/develop
Commit: 5d7d269954342b6d003d4beb26bdac2d4da300d8
Parents: 9cb4d10
Author: Justin Mclean <[email protected]>
Authored: Sat Apr 20 15:25:09 2013 +1000
Committer: Justin Mclean <[email protected]>
Committed: Sat Apr 20 15:25:09 2013 +1000

----------------------------------------------------------------------
 .../projects/framework/src/mx/utils/StringUtil.as  |    3 +++
 .../projects/rpc/src/mx/utils/RPCStringUtil.as     |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5d7d2699/frameworks/projects/framework/src/mx/utils/StringUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/utils/StringUtil.as 
b/frameworks/projects/framework/src/mx/utils/StringUtil.as
index b25df9c..9fcef2e 100644
--- a/frameworks/projects/framework/src/mx/utils/StringUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/StringUtil.as
@@ -150,6 +150,9 @@ public class StringUtil
     /**
      *  Substitutes "{n}" tokens within the specified string
      *  with the respective arguments passed in.
+        * 
+        *  Note that this uses String.replace and "$" can have special
+        *  meaning in the argument strings escape by using "$$".
      *
      *  @param str The string to make substitutions in.
      *  This string can contain special tokens of the form

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5d7d2699/frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as 
b/frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
index d3b77ff..f9de392 100644
--- a/frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
+++ b/frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
@@ -131,6 +131,12 @@ public class RPCStringUtil
             case "\r":
             case "\n":
             case "\f":
+                       // non breaking space
+                       case "\u00A0":
+                       // line seperator
+                       case "\u2028":
+                       // paragraph seperator
+                       case "\u2029":
                 return true;
 
             default:
@@ -141,6 +147,9 @@ public class RPCStringUtil
     /**
      *  Substitutes "{n}" tokens within the specified string
      *  with the respective arguments passed in.
+        * 
+        *  Note that this uses String.replace and "$" can have special
+        *  meaning in the argument strings escape by using "$$".
      *
      *  @param str The string to make substitutions in.
      *  This string can contain special tokens of the form

Reply via email to