String Split in DXL -


I have a string

Ex: "We like questions that are answered Can not just talk, "

Now I call this string"; " Like we like those questions which can be answered and not just discussed.

It is possible in DXL.

I am learning DXL, so I do not know whether we can divide or not.

Note: This is not a work of the house.

Quick Add & amp; I could come up with split. Seam to work fine.

  int array_size (array A) {int size = 0; While (tap (get (a, size, 0)) size ++; return size;} zero array_push_str (array, string str) {int array_index = array_size (a); put (a, str, array_index, 0) ;} String array_get_str (array A, int index) {return (string mill (a, index, 0)); string str_join (string adder, array str_array) {join buffer = create; int array_index = 0; included (= Array_index = 0; array_index & lt; array_iize (str_array); array_index ++) for {+ array_index = array; array_get_str (str_array, array_index); if (array_index + 1 & l T; array_size (str_array)) joined in joiner;} return stringoff (attached)} array str_split (string splitter, strings str) {array token = create (1, 1); create buff buf =; int str_index ; Buf = ""; (Str_index = 0; str_index; length (str); str_index ++) {if str (str [str_index: str_index] == splitter) {array_push_str (token, stringoff (buf)); buf = "";} Else {buf + = str [str_index: str_index];}} Array_push_str (token, stringoff (buff)); delete buf; Return token; }  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -