Re: i need better idea to know if a complete word *really it's* acomplete word
Hello Stefan Tanurkov, On Sat, 22 Feb 2003 01:07:35 -0500 GMT your local time, which was Saturday, February 22, 2003, 1:07:35 PM (GMT+0700) my local time, Stefan Tanurkov wrote: > Good [morning|afternoon|day|evening|night] tracer, t>> would be better if the Bat or email used it... t>> Many programs allas donot use unicode all the way. One reason why t>> for instance using Thai, Mirc gives a channel display with t>> instead of text... > If it was so easy The Bat! could support Unicode right from the > start... The reason programs don't support Unicode is because it is > totally screwed under Windows - MS uses different Unicode > implementations for 9x and NT. Programs should rely on 9x > implementation which is a joke. :-( Not blaming the Bat... However many programs use "mixed" unicode / normal fonts and that can mess things up... Obviously one can set the default for non-unicode to be Thai or whatever but it means text gets messed up using other fonts / languages.. -- Best regards, tracer Using The Bat! v1.63 Beta/7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: i need better idea to know if a complete word *really it's* acomplete word
Hello Kevin J. Menard, Jr., On Thu, 20 Feb 2003 17:33:33 -0500 GMT your local time, which was Friday, February 21, 2003, 5:33:33 AM (GMT+0700) my local time, Kevin J. Menard, Jr. wrote: > Hey Task, > What about using UNICODE instead of ASCII? would be better if the Bat or email used it... Many programs allas donot use unicode all the way. One reason why for instance using Thai, Mirc gives a channel display with instead of text... -- Best regards, tracer Using The Bat! v1.63 Beta/7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: i need better idea to know if a complete word *really it's* acomplete word
Task- If you're using Delphi, how about the AnsiString::IsDelimiter() method? That way you can specify the characters you want as white space to delimit individual words. -Mark Wieder Using The Bat! v1.63 Beta/4 on Windows 2000 5.0 Build 2195 Service Pack 2 -- Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: i need better idea to know if a complete word *really it's* acomplete word
Hey Task, Is there any reason you're not using toupper() or tolower() (or some equivalent in whatever language you're dealing with)? If you're not concerned with case, but only with the word, this will make things substantially easier for you. -- Kevin Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: i need better idea to know if a complete word *really it's* acomplete word
Hello Task, Get this code, it's from my plugin ;-) I have all the the checkings in one module. I have translated the code, it could be one typo with some thing ;-) Function IsSeparator(const txt: String; pos: Integer): Boolean; const Separator : Array [0..26] of Char = (' ', '.', ',', ':', '!', '¡', #39, #34, '&', '%', '$', '/', '\', '*', '#', '?', '¿', '(', ')', '{', '}', '[', ']', '<', '>', '_', '-'); var ret : Boolean; i : Integer; Begin ret:= False; If pos > Length(txt) Then ret:= True Else If pos <= 0 Then ret:= True Else Begin // Start of the vector i:= 0; // While I have separators and I don't found it While (i <= 26) And (ret = False) do Begin If Copy(txt, pos, 1) = Separator[i] Then ret:= True; inc(i); end; end; Result:= ret; end; // maymin -> case sensitive ? // orig -> string to do the search (in original format) // origUp -> string to do the search (in Uppercase) // txt -> string to search // num -> number to add if it's found Function ContainsWord(const maymin: Boolean; const orig: String; const origUp: String; const txt: String; const num: Integer): Integer; var p : Integer; Begin Result:= 0; if maymin then Begin p:= Pos(txt, orig); If p > 0 then If IsSeparator(orig, p-1) and ( Copy(orig, p, length(txt)) = txt ) and IsSeparator(orig, p + length(txt) ) then Result:= num; end else Begin p:= Pos(UpperCase(txt), origUp); If p > 0 then If EsSeparator(orig, p-1) and ( Copy(orig, p, length(txt)) = UpperCase(txt) ) and EsSeparator(orig, p + length(txt) ) then Result:= num; end; end; El jueves, 20 feb 2003 a las 23:29, escribiste: > well i have a question, i use a simple algorith to know if a word is > a complete word, for example i search the complete word "lion" in > "animals: lion, cat, dog, mule" --- /\/ / \ / \ / /\/ e t \/ i c i o u s Using The Bat! 1.63 Beta/5 on Windows XP (5.1.2600 Service Pack 1) Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html
i need better idea to know if a complete word *really it's* acomplete word
off-topic: Vampire 0.01b! is avalaible in http://fyberger.tripod.com/fyberger/vampire/vampire.htm Estimados seguidores del tbdev arroba thebat.dutaint.com well i have a question, i use a simple algorith to know if a word is a complete word, for example i search the complete word "lion" in "animals: lion, cat, dog, mule" zero step: "animals: lion, cat, dog" changed to "ANIMALS: LION, CAT, DOG" "lion" changed to "LION first step: "ANIMALS: LION, CAT, DOG" ¿it the string here? YES second step "ANIMALS: LION, CAT, DOG" ^ ¿is not a letter? YES third step "ANIMALS: LION, CAT, DOG" ^ ¿is not a letter? YES Well to know if a letter or number i use the next criterium: if a character ascii number (is bigger than 65 and shorter than 90) or (is bigger than 48 and shorter than 57) returns true. Well if you use a non traditional ascii chars (for example Ñ in spanish or anothers in others languages) can pass it: "ANIMALES: ÑANDU, LEON, PERRO", search for complete word ANDU "ANIMALES: ÑANDU, LEON, PERRO" (founded) "ANIMALES: ÑANDU, LEON, PERRO" ^ (isn't a letter) "ANIMALES: ÑANDU, LEON, PERRO" ^ (isn't a letter) and WRONG RESULT! i need a better idea. -- Se despide, Task Control mail: TaskControl at SoftHome dot net correo: TaskControl arroba SoftHome punto net Usando: - Windows 98 4.10.1998 - AVG 6.0 Free Edition - The Bat! 1.63 Beta/7 - Trillian PRO 1.0 B Current version is 1.62 | "Using TBDEV" information: http://www.silverstones.com/thebat/TBUDLInfo.html