Overview
| Artifact ID: | 6c73a4ee50cd84e026061b520f59c5807c79cef4 |
|---|---|
| Ticket: | 688554ffffffffffffffffffffffffffffffffff
string match doesn't match strings with NULLs |
| User & Date: | nobody on 2003-02-18 09:49:10 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
[email protected] The following string doesn't work correctly. Depending on the 'binary' line commented out or not 'string match' gives different results. This is true for tcl8.4.0 and tcl8.4.1. proc MatchElem {constraint queueElem} { set result 0 # binary scan $queueElem H* bele1 set result [string match $constraint $queueElem] puts "Match '$constraint' with '$queueElem': result $result" binary scan $queueElem H* bele2 puts "Match '$constraint' with '$queueElem' ($bele2): result $result" return $result } set con "*abc*" set a "\000@abc" MatchElem $con $a puts "[string match $con $a]" set a "@abc" MatchElem $con $a #puts "[string match $con $a]" set a "\000@abc\000" MatchElem $con $a #puts "[string match $con $a]"
- foundin changed to: "obsolete: 8.4.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "18. Commands M-Z"
- title changed to: "string match doesn't match strings with NULLs"
- type changed to: "Bug"