% This file is embedded in datatool-user.pdf version 3.4.2 2025-11-06
% Example 36 Substring Conditionals for use with ifthen
% Label: "ex:DTLissubstr"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool-base} 
\begin{document}
`goose' element of list `ant,duck,goose'?
\ifthenelse{\DTLisinlist{goose}{ant,duck,goose}}{true}{false}. 

`oo' element of list `ant,duck,goose'?
\ifthenelse{\DTLisinlist{oo}{ant,duck,goose}}{true}{false}. 

`oo' in `goose'?
\ifthenelse{\DTLisSubString{goose}{oo}}{true}{false}. 

`oo' in `GOOSE' (case-sensitive)?
\ifthenelse{\DTLisSubString{GOOSE}{oo}}{true}{false}. 

`oo' in `GOOSE' (ignore case)?
\ifthenelse{\DTLisiSubString{GOOSE}{oo}}{true}{false}. 

`go' prefix of `goose'?
\ifthenelse{\DTLisPrefix{goose}{go}}{true}{false}. 

`go' prefix of `GOOSE' (case-sensitive)?
\ifthenelse{\DTLisPrefix{GOOSE}{go}}{true}{false}. 

`go' prefix of `GOOSE' (ignore case)?
\ifthenelse{\DTLisiPrefix{GOOSE}{go}}{true}{false}. 

`se' suffix of `goose'?
\ifthenelse{\DTLisSuffix{goose}{se}}{true}{false}. 

`se' suffix of `GOOSE' (case-sensitive)?
\ifthenelse{\DTLisSuffix{GOOSE}{se}}{true}{false}. 

`se' suffix of `GOOSE' (ignore case)?
\ifthenelse{\DTLisiSuffix{GOOSE}{se}}{true}{false}. 
\end{document}
