I am a C++ beginner. I want to understand how is this `function` operating on a `string` to sort it?

```
int SA_cmp(const void *a, const void *b) { return strcmp(S + *(int*)a, S + *(int*)b); }

```

any pointer will help?