Changeset 29 for trunk/org.etsi.common/src/org/etsi
- Timestamp:
- 05/08/11 18:04:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.etsi.common/src/org/etsi/common/MiscTools.java
r7 r29 116 116 117 117 public static int getLOC(String filename){ 118 int LOC = 0;119 118 String code = MiscTools.readFile(filename); 120 int index = 0; 121 while (index != -1) { 122 if (index == 0){ 123 index = code.indexOf("\n", index); 124 } else { 125 index = code.indexOf("\n", index + 1); 126 } 127 LOC++; 128 } 119 int LOC = code.split("\n").length; 129 120 return LOC; 130 121 }
Note: See TracChangeset
for help on using the changeset viewer.