How to find if a string is in an array? lazarus / 61-Beginners ---------------------------------------------------------------------- bulrush · 2016-06-29 15:56 I'm reading a file and part of the file is a string, call it 'mystring', which I need to validate and make sure it equals one of the strings in an array. This is a shortened sample of the array with valid strings. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Var vartypearr:array[] of string = ('Integer', 'Long', 'String', 'Char');  Is there an easy way to find if 'mystring' is in the array vartypearr? Thank you. ---------------------------------------------------------------------- molly · 2016-06-29 16:08 AnsiIndexStr or AnsiIndexText perhaps ? ---------------------------------------------------------------------- rvk · 2016-06-29 16:28 Copy/paste error on AnsiIndexText-page. QuoteAnsiIndexStr matches AText against each string in AValues. Not sure who handles those or how they are generated. ---------------------------------------------------------------------- molly · 2016-06-29 18:55 @rvk: i had to read several times before i spotted what you meant (even though you highlighted).  It is the same thing as read vs readln  Under normal circumstances and as a reminder for maintainers it is usually advised to be reported as a bug on mantis.