flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Use native trim() method in JS
Date Sat, 09 Jul 2016 19:37:49 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 67e9a458a -> ed45c5b41


Use native trim() method in JS


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

Branch: refs/heads/develop
Commit: ed45c5b41da97a0441c126bfdd5a509ee330b6c3
Parents: 67e9a45
Author: Harbs <harbs@in-tools.com>
Authored: Sat Jul 9 22:37:43 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Sat Jul 9 22:37:43 2016 +0300

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/utils/StringTrimmer.as     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed45c5b4/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
index bbc83f4..2658b49 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
@@ -52,6 +52,7 @@ package org.apache.flex.utils
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
          */
+		COMPILE::SWF
         public static function trim(str:String):String
         {
             if (str == null) return '';
@@ -69,6 +70,13 @@ package org.apache.flex.utils
             else
                 return "";
         }
+		
+		COMPILE::JS
+		public static function trim(str:String):String
+		{
+			if (str == null) return '';
+			return str.trim();
+		}
 
         /**
          *  Removes all whitespace characters from the beginning and end


Mime
View raw message