Module: Jekyll::StringFilter

Defined in:
begin_end.rb

Instance Method Summary collapse

Instance Method Details

#appendSuffixIfDoesNotStartWith(text, query, suffix) ⇒ Object



121
122
123
# File 'begin_end.rb', line 121

def appendSuffixIfDoesNotStartWith(text, query, suffix)
  return (text.start_with? query) ? text : "#{text}#{suffix}"
end

#beginsWith(text, query) ⇒ Object



108
109
110
111
# File 'begin_end.rb', line 108

def beginsWith(text, query)
  #puts "text=#{text} query=#{query} result: #{text.start_with? query}"
  return(text.start_with? query)
end

#doesNotBeginWith(text, query) ⇒ Object



104
105
106
# File 'begin_end.rb', line 104

def doesNotBeginWith(text, query)
  return(!text.start_with? query)
end

#doesNotEndWith(text, query) ⇒ Object



113
114
115
# File 'begin_end.rb', line 113

def doesNotEndWith(text, query)
  return(!text.end_with? query)
end

#endsWith(text, query) ⇒ Object



117
118
119
# File 'begin_end.rb', line 117

def endsWith(text, query)
  return(text.end_with? query)
end