remove the last . in the string it it ends with a .
            for the url structure must follow the flask routing format
            it should be /model/method instead of /model/method/
199976
def blueprint_name_to_url(name):
        
        if name[-1:] == ".":
            name = name[:-1]
        name = str(name).replace(".", "/")
        return name
927990
def remove_last_word lineno
      @list[lineno].chomp!
      line=@list[lineno]
      lastspace = line.rindex(" ")
      if !lastspace.nil?
        lastchars = line[lastspace+1..-1]
        @list[lineno].slice!(lastspace..-1)
        $log.debug " remove_last: lastspace #{lastspace},#{lastchars},#{@list[lineno]}"
        fire_handler :CHANGE, InputDataEvent.new(lastspace,lastchars.length, self, :DELETE, lineno, lastchars)     #  2008-12-26 23:06 
        return lastchars
      end
      return nil
    end
605618
def sortable
      [
        last,
        [
          prefix,
          first,
          middle,
          suffix
        ].reject( &:blank? ).
          join( ' ' )
      ].reject( &:blank? ).
        join( ', ' )
    end
1257864
def delete(self, route: str(), callback: object()):
        
        self.__set_route('delete', {route: callback})
        return RouteMapping
599282
private String removePathFromUrl(String url) {
        String path = extractPathFromUrl(url);
        int end = url.indexOf(path);
        return url.substring(0, end);

        // Alternative: return url.replaceAll("(?<=:[0-9]{1,5})/.*", "")), assume url contains port number
    }
863613
private String removeTrailingSlash(final String objName) {
    if (objName.endsWith("/")) {
      return objName.substring(0, objName.length() - 1);
    }
    return objName;
  }
951560
private String removeTrailingFolderSeparator(String folder) {
		if (folder.endsWith("/") || folder.endsWith("\\")) { 
			folder = folder.substring(0, folder.length() - 1);
		}
		return folder;
	}
495144
function ends_withp(str, substr) {
        return slice(str, str.length - substr.length) == substr
    }
1232014
def set_as_path_prepend
      arr = []
      match = config_get('route_map', 'set_as_path_prepend', @get_args)
      if arr
        match.each do |line|
          next if line.include?('last-as')
          arr = line.strip.split
        end
      end
      arr
    end
1286951
def _ends_with(self, string_to_edit, end):  # pylint: disable=no-self-use
        
        if not string_to_edit.endswith(end):
            return string_to_edit + end
        return string_to_edit
897855
private String removeExtension(String string) {
		String pathWithoutExtension = string;
		int dotIndex = string.lastIndexOf('.');
		if (dotIndex > 0) {
			pathWithoutExtension = string.substring(0, dotIndex);
		}
		return pathWithoutExtension;
	}
684526
def method_missing meth, *args, &block
      meth_s = meth.to_s
      if @method && meth_s =~ API_REGEX

        if meth_s.end_with?('!')
          # `foo! bar' is syntactic sugar for `foo.! bar'
          self[meth_s[0...-1]].!(args[0] || {})

        else
          # chain the method name onto URL path
          self[meth_s]
        end
      else
        super
      end
    end
37338
private void removeTrail() {
        int last = this.size - 1;
        while (last >= 0 && this.arr[last] == this.blankElement) {
            last--;
        }
        this.size = last + 1;
    }
143049
function(str){
    return str.replace(URL_LEFT_RIGHT_RE, function(){
      if(arguments[1]) return arguments[0];
      return arguments[0].substr(0, arguments[0].length - arguments[2].length - 1)
               + (arguments[2] == 'left' ? 'right' : 'left')
               + arguments[0].slice(-1);
    });
  }
328562
def delete(self):
        
        self.requester.delete(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id
        )
        return self
1192179
def replace_last(action)
      raise ArgumentError, "Parameter, 'action', expected to be a #{Action}, but received: #{action}" unless action.is_a? Action

      @actions[@last_done].undo
      @actions[@last_done] = action
      action.do

      nil
    end
1295891
function removeUrlPath (uri) {
  var parsed = url.parse(uri);
  if (parsed.host) {
    delete parsed.pathname;
  }
  return url.format(parsed);
}