diff libinterp/corefcn/Cell.cc @ 23355:08db4e9dd149

* Cell.h, Cell.cc (Cell::string_vector_value): New function.
author John W. Eaton <jwe@octave.org>
date Thu, 06 Apr 2017 13:12:09 -0400
parents 092078913d54
children 855122b993da
line wrap: on
line diff
--- a/libinterp/corefcn/Cell.cc	Wed Apr 05 16:54:21 2017 -0700
+++ b/libinterp/corefcn/Cell.cc	Thu Apr 06 13:12:09 2017 -0400
@@ -151,6 +151,19 @@
   return retval;
 }
 
+string_vector
+Cell::string_vector_value (void) const
+{
+  octave_idx_type n = numel ();
+
+  string_vector retval (n);
+
+  for (octave_idx_type i = 0; i < n; i++)
+    retval.xelem (i) = elem (i).string_value ();
+
+  return retval;
+}
+
 Cell
 Cell::index (const octave_value_list& idx_arg, bool resize_ok) const
 {