W3cubDocs

/Dart 2

decodeQueryComponent method

String decodeQueryComponent (String encodedComponent, { Encoding encoding: utf8 })

Decodes the percent-encoding in encodedComponent, converting pluses to spaces.

It will create a byte-list of the decoded characters, and then use encoding to decode the byte-list to a String. The default encoding is UTF-8.

Implementation

static String decodeQueryComponent(String encodedComponent,
    {Encoding encoding: utf8}) {
  return _Uri._uriDecode(
      encodedComponent, 0, encodedComponent.length, encoding, true);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Uri/decodeQueryComponent.html