What does "offset" mean in the context of programming?

skystar7 picture skystar7 · Oct 19, 2010 · Viewed 17.1k times · Source

What does "offset" mean in the context of programming?

Does it mean in the beginning or by a distance?

What does the String.offsetByCodePoints(int index, int codePointOffset) method do? What does "unpaired surrogates" in the method documentation mean?

Answer

Saken picture Saken · Mar 17, 2020

An example from wikipedia, let's say you have a string "abcdef" the 'd' character will have an offset of three starting from character 'a'.

Offset (computer science)