override DropDownController.checkText
@param {String} str
@return {aria.widgets.controllers.reports.DropDownControllerReport}
191835
function (str) {

            var dataModel = this._dataModel, options = dataModel.listContent, selectedValues;

            // retrieve selection from string
            selectedValues = this._parseInputString(options, str);

            if (!ariaUtilsJson.equals(selectedValues, dataModel.value)) {

                ariaUtilsJson.setValue(dataModel, 'value', selectedValues);
                ariaUtilsJson.setValue(dataModel, 'text', this._getDisplayValue(selectedValues));
                ariaUtilsJson.setValue(dataModel, 'selectedValues', selectedValues);
            }

            var report = new ariaWidgetsControllersReportsDropDownControllerReport();

            report.text = dataModel.text;
            report.value = this._getValue(dataModel.text, dataModel.value);

            return report;
        }
97334
function () {
                var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                report.displayDropDown = (this._listWidget == null);
                if (this._dataModel && this._dataModel.displayIdx !== this._dataModel.selectedIdx) {
                    this._setDisplayIdx(this._dataModel.displayIdx);
                }
                return report;
            }
333934
function (charCode, keyCode, currentText, caretPosStart, caretPosEnd, event) {
            var dataModel = this._dataModel, domEvent = ariaDomEvent, report, selectionKey;

            if (this._listWidget) {
                selectionKey = this.checkSelectionKeys(event);
            }
            if (!domEvent.isNavigationKey(keyCode) && !selectionKey) {
                // value that should be in the input after this keystroke and also the caret positions
                var nextValueObject;
                var isDelKey = (keyCode == domEvent.KC_DELETE || keyCode == domEvent.KC_BACKSPACE);
                if (isDelKey) {
                    nextValueObject = this._getTypedValueOnDelete(keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    nextValueObject = this._getTypedValue(charCode, currentText, caretPosStart, caretPosEnd);
                }

                dataModel.initialInput = nextValueObject.nextValue;

                return this._checkInputKey(charCode, keyCode, nextValueObject.nextValue, nextValueObject.caretPosStart, nextValueObject.caretPosEnd);
            }

            // Handling for navigation. First if dropdown list is opened
            if (this._listWidget) {
                if (!selectionKey && keyCode == domEvent.KC_ESCAPE) {
                    report = this.checkText(dataModel.initialInput);
                    if (!report) {
                        report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    report.text = dataModel.initialInput;
                    // data Model value reset on escape to retain error no escape PTR 05163905
                    report.value = report.text;
                    report.cancelKeyStroke = true;
                    dataModel.value = null;
                    return report;

                } else if (selectionKey || keyCode == domEvent.KC_TAB) {
                    if (dataModel.selectedIdx != -1) {
                        if (dataModel.selectedIdx != null) {
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[dataModel.selectedIdx]);
                            dataModel.value = dataModel.listContent[dataModel.selectedIdx].value;
                        }
                        report = this.checkDropdownValue(dataModel.value);
                    } else {
                        var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    if (keyCode != domEvent.KC_TAB) {
                        report.cancelKeyStroke = true; // prevent fieldset onSubmit when typing ENTER
                    }
                    return report;
                } else if (keyCode == domEvent.KC_ARROW_LEFT) {
                    return;
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();

                    var oldIdx = dataModel.selectedIdx;
                    this._listWidget.sendKey(0, keyCode);
                    var newIdx = dataModel.selectedIdx;
                    if (oldIdx != newIdx) {
                        report.ok = true;
                        if (newIdx == -1) {
                            dataModel.value = null;
                            dataModel.text = dataModel.initialInput;
                        } else {
                            dataModel.value = dataModel.listContent[newIdx].value;
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[newIdx]);
                        }
                        report.text = dataModel.text;
                    }
                    return report;
                }
            } else {
                // otherwise open list dropdown on arrow down if needed
                if (keyCode == domEvent.KC_ARROW_DOWN) {
                    report = this._checkInputKey(charCode, keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();
                }
                // domEvent.KC_ESCAPE for issue#697 on FF
                if (report && keyCode != domEvent.KC_TAB && keyCode != domEvent.KC_ARROW_DOWN) {
                    // domEvent.KC_ESCAPE for issue#697 on FF
                    report.cancelKeyStrokeDefaultBehavior = (keyCode == domEvent.KC_ESCAPE);
                }
                return report;
            }
        }
841853
function searchInput() {
			var i, item,
				searchText = moduleSearch.value.toLowerCase(),
				listItems = dropDownList.children;

			for ( i = 0; i < listItems.length; i++ ) {
				item = listItems[ i ];
				if ( !searchText || item.textContent.toLowerCase().indexOf( searchText ) > -1 ) {
					item.style.display = "";
				} else {
					item.style.display = "none";
				}
			}
		}
231966
function (str, highlight) {
      this.currentMatch.replace = this.filterString(str, highlight);
      this.currentMatch.hasMatches = str !== this.currentMatch.replace;

      return this;
    }
610425
function (text, hasErrors) {
            // return object
            var report;
            // an empty field is usually not considered as an error
            if (!text) {
                report = this.checkValue(null);
            } else {
                if (text === this._dataModel.displayText) {
                    report = new ariaWidgetsControllersReportsControllerReport();
                    report.ok = true;
                } else {
                    var date = this.interpretText(text);
                    if (date) {
                        report = this.checkValue(date);
                    } else {
                        report = new ariaWidgetsControllersReportsControllerReport();
                        report.ok = false;
                        report.errorMessages.push(this.getErrorMessage("validation"));
                    }
                }
            }

            return report;
        }
1201093
function(str) {
    var tag = /#([a-z]+)\{|\}/,
        cstack = [],
        matches = null,
        orig = null,
        name = null,
        code = null;

    while (tag.test(str)) {
        matches = tag.exec(str);
        orig = matches[0];

        if (console.isColored()) {
            if (orig === '}') {
                cstack.pop();
            } else {
                name = matches[1];
                if (name in _ANSICODES) {
                    code = _ANSICODES[name];
                    cstack.push(code);
                }
            }

            str = str.replace(orig, _ANSICODES.reset + cstack.join(''));
        } else {
            str = str.replace(orig, '');
        }
    }
    return str;
}
711577
def check_text(self, text):
        """"""
        if to_text_string(text) == u'':
            self.button_ok.setEnabled(False)
        else:
            self.button_ok.setEnabled(True)
556240
function(str) {
      var type, res;

      str = str || '';
      res = str.match(/(uncaught)?\s?(\w+)\:/i);
      type = (res) ? res[2] : null;

      return type;
    }
775099
function parseJSON(str) {
                                            var result;
                                            try {
                                                result = $scope.options.parserFn(str);
                                            } catch (e) {
                                                return str;
                                            }
                                            return result;
                                        }
987430
function (target, value, text) {
			var inst = this._getInst(target),
				onChange = this._get(inst, 'onChange');
			$("#sbSelector_" + inst.uid).text(text);
			$(target).find("option[value='" + value + "']").attr("selected", TRUE);
			if (onChange) {
				onChange.apply((inst.input ? inst.input[0] : null), [value, inst]);
			} else if (inst.input) {
				inst.input.trigger('change');
			}
		}
659182
function toStringSafe(str, defValue = '') {
    if (isNullOrUndefined(str)) {
        str = '';
    }
    str = '' + str;
    if ('' === str) {
        str = defValue;
    }
    return str;
}
334733
function (str) {
      var index = this.html.indexOf(str, this.currentChar) + str.length;
      if (index === -1)
        this.currentChar = this.html.length;
      this.currentChar = index;
    }
739494
function (value) {
            if (value && this.controller && this.controller.getDisplayTextFromValue) {
                return this.controller.getDisplayTextFromValue(this._cfg.prefill);
            } else {
                return value;
            }
        }
372777
function (p) {
            var src = ariaWidgetsFormDropDownListTrait.prototype;
            for (var key in src) {
                if (src.hasOwnProperty(key) && !p.hasOwnProperty(key)) {
                    // copy methods which are not already on this object (this avoids copying $classpath and
                    // $destructor)
                    p[key] = src[key];
                }
            }
        }
1280539
function randstr(options) {
    var opt = _validateOptions(options);
    var from, to;
    if (Array.isArray(opt.length)) {
        _a = opt.length, from = _a[0], to = _a[1];
    }
    else {
        from = to = opt.length;
    }
    var str = '';
    if (0 === to) {
        return str;
    }
    var charsIsString = 'string' === typeof opt.chars;
    var charsLastIndex = charsIsString ? opt.chars.length - 1 : 0;
    var includeControlChars = true === opt.includeControlChars;
    var hasAcceptableFunc = 'function' === typeof opt.acceptable;
    var hasReplacer = 'function' === typeof opt.replacer;
    var max = _randomIntBetween(opt.random, from, to);
    // console.log( 'max', max, 'from', from, 'to', to );
    for (var i = 0, len = 0, charCode = void 0, chr = void 0; i < max && len < max; ++i) {
        if (charsIsString) {
            var index = _randomIntBetween(opt.random, 0, charsLastIndex);
            charCode = opt.chars.charCodeAt(index);
        }
        else {
            charCode = _randomIntBetween(opt.random, opt.chars[0], opt.chars[1]);
        }
        // Non printable?
        if (!includeControlChars && _isControlChar(charCode)) {
            // console.log( 'NOT PRINTABLE!');
            --i; // back to try again
            continue;
        }
        chr = String.fromCharCode(charCode);
        // console.log( 'charCode', charCode, 'char', chr );
        if (hasAcceptableFunc && !opt.acceptable.call(null, chr)) {
            --i; // back to try again
            continue;
        }
        if (hasReplacer) {
            chr = opt.replacer.call(null, chr);
            // console.log( 'char after', chr );
            // Their combined length pass the limit?
            if ((len + chr.length) > max) {
                // console.log( 'greater than max!', 'i', i, 'max', max, 'str', len, 'chr', chr.length );
                --i; // back to try again
                continue;
            }
        }
        str += chr;
        len = str.length;
    }
    return str;
    var _a;
}
477691
function parse (str, options) {
  if (typeof str !== 'string') throw new TypeError('str is required!');

  var splitData = split(str);
  var raw = splitData.data;

  if (!raw) return { _content: str };

  var data;

  data = parseYAML(raw, options);

  if (!data) return { _content: str };

  data._content = splitData.content;

  return data;
}