Skip to contents

Given two strings, return the identical portion beginning from the first character and on.

Usage

shared_initial_substring(s1, s2)

Arguments

s1

The first string

s2

The second string

Value

The shared substring

Author

Adam Kapelner

Examples

shared_initial_substring("money can't buy me love", "money can buy me love") 
#> [1] "money can"
#> "money can"