Abstract : The LCF of two words u and v is the maximal length of a common factor of u and v. A linear time algorithm to compute LCF is given, based on a linear time algorithm to build the minimal suffix automaton of a word. The algorithm naturally turns into a real-time string-matching algorithm.