1. -- 
  2. -- Copyright (c) 2012 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. package Widgets.Input_Boxes.Constraints is 
  10.  
  11.     -- Returns 'newstr' only if it contains the basename of a file, without an 
  12.     -- extension or path. If 'newstr' contains any invalid filename characters, 
  13.     -- a path, or a dot for an extension, then 'curstr' will be returned. 
  14.     function Basename_Only( curstr, newstr : String ) return String; 
  15.  
  16.     -- Returns 'newstr' only if it contains a filename, without a path. If 
  17.     -- 'newstr' contains any invalid filename characters or a path, then 
  18.     -- 'curstr' will be returned. 
  19.     function Filename_Only( curstr, newstr : String ) return String; 
  20.  
  21.     -- Returns 'newstr' only if it contains an integer or is an empty string. 
  22.     -- If 'newstr' contains any non-digit characters then 'curstr' will be 
  23.     -- returned. 
  24.     function Int_Only( curstr, newstr : String ) return String; 
  25.  
  26. end Widgets.Input_Boxes.Constraints;