News blog

What is Servoy?

Getting Started

Comparison Servoy/VFP




Code Reference


VFP2Servoy Toolkit



Contact / feedback















AT() - string.indexOf()

Searches a character expression for the occurrence of another character expression and returns the position where the string was found. In Servoy the position is zero-based, the first character is at position 0, for VFP this is position 1. If the searchString was not found then VFP returns a 0 and Servoy returns -1. This is important to remember.


VFP code example

? AT("World", "Hello World")  && returns 7

? AT("Hi", "Hello World") && returns 0


Servoy code example

cString = "Hello World";
application.output(cString.indexOf("World"))  // outputs  6 !!

.output(cString.indexOf("Hi"))     // outputs -1 !!

Note: AT() is a function of the VFP2Servoy Toolkit



External resources:


vfp plugin


ServoyWorld 2012 pics


Official Servoy website


Ken Levy on Servoy


Servoy info


Servoy Forum


Servoy Documentation © 2010-2012 • All rights reserved • Contact: