comparison libinterp/corefcn/regexp.cc @ 20616:fd0efcdb3718

use new string_value method to handle value extraction errors * dirfns.cc, file-io.cc, gammainc.cc, help.cc, load-path.cc, octave-link.cc, qz.cc, regexp.cc, strfns.cc, syscalls.cc, time.cc, variables.cc: Use new string_value method.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Oct 2015 19:00:51 -0400
parents 1a0a433c8263
children
comparison
equal deleted inserted replaced
20615:729a85dafba8 20616:fd0efcdb3718
286 286
287 for (int i = skip; i < nargin; i++) 287 for (int i = skip; i < nargin; i++)
288 { 288 {
289 std::string str; 289 std::string str;
290 290
291 if (args(i).is_string ()) 291 str = args(i).string_value ("%s: optional arguments must be strings", who.c_str ());
292 str = args(i).string_value ();
293 else
294 {
295 error ("%s: optional arguments must be strings", who.c_str ());
296 break;
297 }
298 292
299 std::transform (str.begin (), str.end (), str.begin (), tolower); 293 std::transform (str.begin (), str.end (), str.begin (), tolower);
300 294
301 if (str.find ("once", 0) == 0) 295 if (str.find ("once", 0) == 0)
302 options.once (true); 296 options.once (true);