對字串中的單字進行排序我想在字串中按字母順序對單字進行排序。我一直試圖將列表恢復為一個字串。
string= "sort this sentence";
string_list = sort list(words(string )); // string_list = {"sentence", "sort", "this"};
Sorted_string = (string_list); // not sure how to create Sorted_string = "sentence sort this"
show(string, string_list, Sorted_string);自動化和腳本編寫回覆:對字串中的單字進行排序在 JMP 中您可以使用連接項目()
Names Default To Here(1);
Concat Items({"www", "jmp", "com"}, "."); //"www.jmp.com"回覆:對字串中的單字進行排序謝謝你讓我走上了正軌。
string= "sort this sentence";
string_list = sort list(words(string));
sorting_string = "";
for(i=1, i<=nitems(string_list), i++,
if(i<NITEMS></NITEMS><BR />----------------<BR />Log:<BR />string = "sort this sentence";<BR />string_list = {"sentence", "sort", "this"};<BR />Sorting_string = "sentence sort this";<BR />回覆:對字串中的單字進行排序我仍然建議在這種情況下使用 Concat Items()
Names Default To Here(1);
string = "sort this sentence";
string_list = Sort List(Words(string));
Sorted_string = Concat Items(string_list, " ");
Show(string, string_list, Sorted_string);
string = "sort this sentence";
string_list = {"sentence", "sort", "this"};
Sorted_string = "sentence sort this";回覆:對字串中的單字進行排序完美的! 謝謝!