Module:String2/sandbox: Difference between revisions

Content deleted Content added
ttweak findpagetext per talk so it won't fail if given an invalid or nonexistent page title; remove comment about multiple values which doesn't apply in an expression
add startswith
Line 350:
 
return p.hyphen_to_dash(str, spacing)
end
 
-- Similar to [[Module:String#endswith]]
function p.startswith(frame)
return (frame.args[1]:sub(1, frame.args[2]:len()) == frame.args[2]) and 'yes' or ''
end