act as a substitute for vs function as

act as a substitute for

function as

How often have the words act as a substitute for and function as occurred in a corpus of books? (source: Google Ngram Viewer )