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

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

[Octave-bug-tracker] [bug #53095] strsplit fails to split a string with


From: anonymous
Subject: [Octave-bug-tracker] [bug #53095] strsplit fails to split a string with a delimiter of '\n' (null character)
Date: Thu, 8 Feb 2018 09:36:17 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0

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

                 Summary: strsplit fails to split a string with a delimiter of
'\n' (null character)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 08 Feb 2018 02:36:16 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Alex A.
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hello,

Here's the test code:

asciicode = [97, 0, 0, 98, 0, 0, 99];
str = char(asciicode);
delimiter = '\0';
C = strsplit(str,delimiter)


The result should be:

C = 

    'a'    'b'    'c'


The code works fine in Matlab, but fails in Octave with the following error
message:


error: regexp: missing ) at position 1 of expression
error: called from
    strsplit at line 212 column 19
    stringexperiment at line 7 column 3





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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