Files
sdk/pkg/analysis_server/test/analysis_abstract.dart
Konstantin Shcheglov 5c096609a1 Remove AbstractAnalysisTest.
All tests have been migrated to PubPackageAnalysisServerTest.

Change-Id: Id6156e0a45772e1bf0d2acd9ece04639414442f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-24 04:25:50 +00:00

19 lines
623 B
Dart

// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
int findIdentifierLength(String search) {
var length = 0;
while (length < search.length) {
var c = search.codeUnitAt(length);
if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) ||
c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) ||
c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0) ||
c == '_'.codeUnitAt(0))) {
break;
}
length++;
}
return length;
}