FASTA format: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 2,186: | Line 2,186: | ||
0 OK, 0:431 </pre> |
0 OK, 0:431 </pre> |
||
=={{header|V (Vlang)}}== |
|||
<syntaxhighlight lang="Vlang"> |
|||
const data = ( |
|||
">Rosetta_Example_1 |
|||
THERECANBENOSPACE |
|||
>Rosetta_Example_2 |
|||
THERECANBESEVERAL |
|||
LINESBUTTHEYALLMUST |
|||
BECONCATENATED" |
|||
) |
|||
fn main() { |
|||
mut i := 0 |
|||
for i <= data.len { |
|||
if data.substr_ni(i, i + 17) == ">Rosetta_Example_" { |
|||
print("\n" + data.substr_ni(i, i + 18) + ": ") |
|||
i = i + 17 |
|||
} |
|||
else { |
|||
if data.substr_ni(i, i + 1) > "\x20" {print(data[i].ascii_str())} |
|||
} |
|||
i++ |
|||
} |
|||
} |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
>Rosetta_Example_1: THERECANBENOSPACE |
|||
>Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED |
|||
</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{trans|Kotlin}} |
{{trans|Kotlin}} |