Ordinamento delle parole in una stringaVorrei ordinare le parole in ordine alfabetico in una stringa.Sono bloccato nel tentativo di riportare l'elenco in una stringa.
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);Automazione e scriptingRe: Ordinamento delle parole in una stringaIn JMP puoi usare Concatena elementi()
Names Default To Here(1);
Concat Items({"www", "jmp", "com"}, "."); //"www.jmp.com"Re: Ordinamento delle parole in una stringaGrazie, mi hai messo sulla strada giusta.
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 />Re: Ordinamento delle parole in una stringaSuggerirei comunque di utilizzare Concat Items() in casi come questo
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";Re: Ordinamento delle parole in una stringaPerfetto! Grazie!