对字符串中的单词进行排序我想在字符串中按字母顺序对单词进行排序。我一直试图将列表恢复为一个字符串。
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";回复:对字符串中的单词进行排序完美的! 谢谢!