diff libinterp/octave-value/ov.h @ 20611:40ed9b46a800

new octave_value::string_value method with optional error message * ov.h (octave_value::string_vector): New method. ov-base.cc, ov-base.h (octave_base_value::string_vector): New default method. ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::string_value): New method.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Oct 2015 16:43:22 -0400
parents 5dfaaaae784f
children e5986cba4ca8
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h	Thu Oct 08 20:15:19 2015 +0100
+++ b/libinterp/octave-value/ov.h	Thu Oct 08 16:43:22 2015 -0400
@@ -897,6 +897,14 @@
   std::string string_value (bool force = false) const
   { return rep->string_value (force); }
 
+  std::string string_value (const char *fmt, ...) const
+  {
+    va_list args;
+    va_start (args,fmt);
+    return rep->string_value (fmt, args);
+    va_end (args);
+  }
+
   Array<std::string> cellstr_value (void) const
   { return rep->cellstr_value (); }