octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34709] help strsplit isn't helpful: what is P


From: Clem
Subject: [Octave-bug-tracker] [bug #34709] help strsplit isn't helpful: what is P?
Date: Mon, 31 Oct 2011 20:52:44 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

URL:
  <http://savannah.gnu.org/bugs/?34709>

                 Summary: help strsplit isn't helpful: what is P?
                 Project: GNU Octave
            Submitted by: clemwang
            Submitted on: Mon 31 Oct 2011 08:52:43 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Documentation
                  Status: None
             Assigned to: None
         Originator Name: Clem
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: Mac OS

    _______________________________________________________

Details:

I've seen various versions of functions similarly named to strsplit, so I have
some idea of how it should work...  Presumably the first argument is a string,
but the documentation isn't helpful and describes the parameter as "P" but
fails to describe what P is!  From the error msg, I can see that it's not a
string, but I can't begin to guess what it might be....

Also, looking at the Matlab documentation, it seems to suggest that the
function strsplit() should work the way that I expect: the first argument is a
string.

(I also notice in the documentation for the various string functions, that
sometimes "s" is used for the parameter string and sometimes "str".  It should
be consistent.)


Here is the output that I find unhelpful:


>> strsplit('foo   bar   baz')
error: Invalid call to strsplit.  Correct usage is:

 -- Function File: [S] = strsplit (P, SEP, STRIP_EMPTY)


>> help strsplit
`strsplit' is a function from the file
/Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/strings/strsplit.m

 -- Function File: [S] = strsplit (P, SEP, STRIP_EMPTY)
     Split a single string using one or more delimiters and return a
     cell array of strings.  Consecutive delimiters and delimiters at
     boundaries result in empty strings, unless STRIP_EMPTY is true.
     The default value of STRIP_EMPTY is false.

     See also: strtok







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34709>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]