@@ -111,11 +111,13 @@ public static String getString(Object[] array, boolean ignoreEmptyItem) {
111
111
public static String getString (Object [] array , String split ) {
112
112
return getString (array , split , false );
113
113
}
114
+ //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
114
115
/**获取string,为null则返回""
115
- * @param array
116
- * @param split
117
- * @param ignoreEmptyItem
118
- * @return
116
+ * @param array -the str array given
117
+ * @param split -the token used to split
118
+ * @param ignoreEmptyItem -whether to ignore empty item or not
119
+ * @return {@link #getString(Object[], String, boolean)}
120
+ * <p>Here we replace the simple "+" way of concatenating with Stringbuilder 's append</p>
119
121
*/
120
122
public static String getString (Object [] array , String split , boolean ignoreEmptyItem ) {
121
123
StringBuilder s = new StringBuilder ("" );
@@ -530,10 +532,13 @@ public static String getNumber(CharSequence cs) {
530
532
public static String getNumber (String s ) {
531
533
return getNumber (s , false );
532
534
}
535
+
536
+ //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
533
537
/**去掉string内所有非数字类型字符
534
- * @param s
538
+ * @param s -string passed in
535
539
* @param onlyStart 中间有非数字时只获取前面的数字
536
- * @return
540
+ * @return limit String
541
+ * <p>Here we replace the simple "+" way of concatenating with Stringbuilder 's append</p>
537
542
*/
538
543
public static String getNumber (String s , boolean onlyStart ) {
539
544
if (isNotEmpty (s , true ) == false ) {
@@ -631,10 +636,12 @@ public static String getCorrectEmail(String email) {
631
636
public static String getPrice (String price ) {
632
637
return getPrice (price , PRICE_FORMAT_DEFAULT );
633
638
}
639
+ //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182
634
640
/**获取价格,保留两位小数
635
- * @param price
641
+ * @param price -price passed in
636
642
* @param formatType 添加单位(元)
637
- * @return
643
+ * @return limit String
644
+ * <p>Here we replace the simple "+" way of concatenating with Stringbuilder 's append</p>
638
645
*/
639
646
public static String getPrice (String price , int formatType ) {
640
647
if (isNotEmpty (price , true ) == false ) {
0 commit comments