mttSeparateText.m 391 B

123456789101112131415
  1. function [left,right] = mttSeparateText(text)
  2. if isempty(text)
  3. left = [] ;
  4. right = [] ;
  5. else
  6. whitespace = min(find(isspace(text))) ;
  7. if isempty(whitespace)
  8. left = text ;
  9. right = [] ;
  10. else
  11. left = text(1:whitespace-1) ;
  12. right = mttClipText(text(whitespace+1:length(text))) ;
  13. end
  14. end