title: Need a functional interface to manipulate a String
body: <p>I have to stream through a set of key/value pairs and modify each key (not value) to remove a prepended string. I'm trying to do it in one statement, but need a little help with it. </p>
  
  <p>I'm sure I need a <code>.map()</code> operation, but I can't quite get it going. Here's my code before trying any conversion:</p>
  
  <pre><code>Map&lt;String, String&gt; properties = configs.stream()
                  .flatMap(config -&gt; config.getProperties().entrySet().stream())
                  .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (left, right) -&gt; right));
  </code></pre>
  
  <p>So my naive solution was to wrap <code>Map.Entry::getKey</code> in a <code>String</code> function, but I get a compile error saying that a functional interface is required. Is there something out-of-the-box I can use here, or do I really need to implement my own interface to get rid of the string?</p>