Next: global_replace Up: Search and substitution Previous: backward_search

### msearch

`int msearch(char * string, int end, int direction);`

Searches for a character among str (except the last 0) in the current buffer, forward if direction is positive or null and backward if direction is negative. Search stops at the end position. Returns 1 and goes to the corresponding position on success, otherwise returns 0 and goes to end position. Here is its definition: