zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

string_helpers.ex (352B)


      1 defmodule EarmarkParser.Helpers.StringHelpers do
      2 
      3   @moduledoc false
      4 
      5   @doc """
      6   Remove the leading part of a string
      7   """
      8   def behead(str, ignore) when is_integer(ignore) do
      9     String.slice(str, ignore..-1)
     10   end
     11 
     12   def behead(str, leading_string) do
     13     behead(str, String.length(leading_string))
     14   end
     15 
     16 end
     17 # SPDX-License-Identifier: Apache-2.0