StringTools - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Combinatorics on Words : StringTools/IsConjugate

StringTools

 IsConjugate
 test whether two strings are conjugate

 Calling Sequence IsConjugate( s, t )

Parameters

 s - string t - string

Description

 • The IsConjugate(s,t) command tests whether its arguments are conjugate strings. Two strings are conjugate if one is a cyclic permutation of the other.
 • If s and t are empty strings, the command returns true.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{IsConjugate}\left("abc","bca"\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{IsConjugate}\left("abc","acb"\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{IsConjugate}\left("abc","abcd"\right)$
 ${\mathrm{false}}$ (3)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam