|
|
|
@ -91,6 +91,9 @@ public class CSSUtils {
|
|
|
|
|
|
|
|
|
|
public static Float parseFloat(String str){ |
|
|
|
|
float result = 0.0f; |
|
|
|
|
if(str == null){ |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if(str.endsWith("px") || str.endsWith("pt")){ |
|
|
|
|
result = Float.parseFloat(str.substring(0, str.length() - 2)); |
|
|
|
@ -100,7 +103,7 @@ public class CSSUtils {
|
|
|
|
|
result = Float.parseFloat(str); |
|
|
|
|
} |
|
|
|
|
}catch (NumberFormatException e){ |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|