# $Header: /home/cvsroot/tcldb/ucodb/Tlib/stringFix,v 1.1.1.1 1996/10/12 01:08:25 de Exp $
# tcl procs saved on Sun Sep 03 16:18:57 PDT 1995

proc stringFix strg {

#
#	all we do is strip quotes at the moment and remove any lead/trail
#	curlies AND trailing blanks 
#	(Jun 96) AND trailing newlines -- thanks for breaking the text widget JO.
#
#	This is lifted from the chkSel proc in wisql 1.4
#	$w.data.pic.win.winR.$col.st insert 0 "$where($ind,sql)"
#
        set err [regsub -all \" $strg "" strg]
        if {$err == 0} {
#               echo "failed to find dbl quotes strip sgl"
        } 

        set err [regsub -all \' $strg "" strg]
	if {$err  == 0} {
#               echo "failed to find sgl quotes strip braces"
	}

	set strg "[string trimleft [string trimright $strg \}] \{]"

	set strg "[string trimright $strg \n]"

	set strg "[string trimright $strg]"

	return $strg
	
}

