Home > Applications > SpinW > external > strword.m

iFit/strword

PURPOSE ^

extract words separated by whitespace from string

SYNOPSIS ^

function out = strword(str, idx, last)

DESCRIPTION ^

 extract words separated by whitespace from string

 out = strword(str, idx, {last})

 Input:

 str       String input.
 idx       indexes of the words to be extracted.
 last      If true, the last word is given if idx contains an element
           larger than the word count, if flase an empty string.
           Default is false.

 Output:

 out       Cell contains the extracted words in the order idx is give.

 Example:

 strword(' one two three four',[4 1])
 the output will be: {'four' 'one'}.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1