Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: dart/pkg/dartdoc/lib/src/dartdoc/utils.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/pkg/dartdoc/lib/src/dartdoc/nav.dart ('k') | dart/pkg/dartdoc/lib/src/markdown/ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of dartdoc;
2
3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
6 4
7 // Generic utility functions. 5 // Generic utility functions.
8 6
9 /** Turns [name] into something that's safe to use as a file name. */ 7 /** Turns [name] into something that's safe to use as a file name. */
10 String sanitize(String name) => name.replaceAll(':', '_').replaceAll('/', '_'); 8 String sanitize(String name) => name.replaceAll(':', '_').replaceAll('/', '_');
11 9
12 /** Returns the number of times [search] occurs in [text]. */ 10 /** Returns the number of times [search] occurs in [text]. */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (items.length == 2) return "${items[0]} $conjunction ${items[1]}"; 68 if (items.length == 2) return "${items[0]} $conjunction ${items[1]}";
71 return '${Strings.join(items.getRange(0, items.length - 1), ', ')}' 69 return '${Strings.join(items.getRange(0, items.length - 1), ', ')}'
72 ', $conjunction ${items[items.length - 1]}'; 70 ', $conjunction ${items[items.length - 1]}';
73 } 71 }
74 72
75 void writeString(File file, String text) { 73 void writeString(File file, String text) {
76 var randomAccessFile = file.openSync(FileMode.WRITE); 74 var randomAccessFile = file.openSync(FileMode.WRITE);
77 randomAccessFile.writeStringSync(text); 75 randomAccessFile.writeStringSync(text);
78 randomAccessFile.closeSync(); 76 randomAccessFile.closeSync();
79 } 77 }
OLDNEW
« no previous file with comments | « dart/pkg/dartdoc/lib/src/dartdoc/nav.dart ('k') | dart/pkg/dartdoc/lib/src/markdown/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698