String append with format in android -
Anyone help me please do not know how to add string as a format to Android:
string key = ""; Attach ("% d-% d-% d", 0, 1, 2)); Please give me an example. Thanks in advance.
Use a stringbinder or stringbuffer, but with sufficient initial capacity to avoid allocation again. The default capacity is 16, so once you get more than that, then the data must be copied to a new large space. Use not append.
int integer = 5; Stringbuilder S = new string builder (100); S.append ("something"); S.append (integer); S.append ("more text");
Comments
Post a Comment