[Tizen] save 800ms when changing to small letter 21/150821/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 19 Sep 2017 00:22:54 +0000 (09:22 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 19 Sep 2017 00:22:54 +0000 (09:22 +0900)
Change-Id: Idcef8108888f184cfb52955942ca94a186da645b
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Tizen.NUI/src/internal/PropertyHelper.cs
Tizen.NUI/src/public/BaseComponents/VisualView.cs
Tizen.NUI/src/public/VisualMaps.cs

index e2b6311..61fc04c 100755 (executable)
@@ -16,6 +16,8 @@
 
 namespace Tizen.NUI
 {
+    using System.Text;
+
     internal static class PropertyHelper
     {
         ///<summary>
@@ -24,9 +26,9 @@ namespace Tizen.NUI
         internal static Property GetPropertyFromString(Animatable handle, string stringProperty)
         {
             /// Convert property string to be lowercase
-            string str1 = stringProperty.Substring(0, 1);
-            string str2 = stringProperty.Substring(1);
-            string str = str1.ToLower() + str2;
+            StringBuilder sb = new StringBuilder(stringProperty);
+            sb[0] = (char)(sb[0] | 0x20);
+            string str = sb.ToString();
 
             Property property = new Property(handle, str);
             if (property.propertyIndex == Property.INVALID_INDEX)
index 10d2619..b67bab9 100755 (executable)
@@ -16,6 +16,7 @@
 namespace Tizen.NUI.BaseComponents
 {
     using System;
+    using System.Text;
     using System.Runtime.InteropServices;
     using System.Collections.Generic;
     using System.Linq;
@@ -306,9 +307,9 @@ namespace Tizen.NUI.BaseComponents
                     _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
                     _animator.Add("timePeriod", new PropertyValue(_timePeriod));
 
-                    string _str1 = property.Substring(0, 1);
-                    string _str2 = property.Substring(1);
-                    string _str = _str1.ToLower() + _str2;
+                    StringBuilder sb = new StringBuilder(property);
+                    sb[0] = (char)(sb[0] | 0x20);
+                    string _str = sb.ToString();
                     if (_str == "position") {_str = "offset";}
 
                     PropertyValue destVal = PropertyValue.CreateFromObject(destinationValue);
@@ -433,9 +434,9 @@ namespace Tizen.NUI.BaseComponents
                     _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
                     _animator.Add("timePeriod", new PropertyValue(_timePeriod));
 
-                    string _str1 = property.Substring(0, 1);
-                    string _str2 = property.Substring(1);
-                    string _str = _str1.ToLower() + _str2;
+                    StringBuilder sb = new StringBuilder(property);
+                    sb[0] = (char)(sb[0] | 0x20);
+                    string _str = sb.ToString();
                     if (_str == "position") {_str = "offset";}
 
                     PropertyValue destVal = PropertyValue.CreateFromObject(destinationValue);
index 29a7eb7..07a3873 100755 (executable)
@@ -15,6 +15,7 @@
 
 namespace Tizen.NUI
 {
+    using System.Text;
     using System.Collections.Generic;
     using Tizen.NUI.BaseComponents;
 
@@ -2307,9 +2308,9 @@ namespace Tizen.NUI
             _timePeriod.Add("delay", new PropertyValue(_startTime / 1000.0f));
             _animator.Add("timePeriod", new PropertyValue(_timePeriod));
 
-            string _str1 = _propertyIndex.Substring(0, 1);
-            string _str2 = _propertyIndex.Substring(1);
-            string _str = _str1.ToLower() + _str2;
+            StringBuilder sb = new StringBuilder(_propertyIndex);
+            sb[0] = (char)(sb[0] | 0x20);
+            string _str = sb.ToString();
 
             PropertyValue val = PropertyValue.CreateFromObject(_destinationValue);