Skip to content

Commit

Permalink
add github links
Browse files Browse the repository at this point in the history
  • Loading branch information
osiegmar committed Aug 26, 2024
1 parent 873ed46 commit 66caf29
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/content/docs/guides/Examples/byte-order-mark.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ In the following example, a CSV file with a BOM header is created and read using

<Code code={sourceCode} title="ExampleCsvReaderWithBomHeader.java" lang="java" mark={highlights}/>

You also find this source code example in the
[FastCSV GitHub repository](https://github.com/osiegmar/FastCSV/blob/main/example/src/main/java/example/ExampleCsvReaderWithBomHeader.java).

:::tip
To **create** CSV files with a BOM header using FastCSV, you have to write the BOM header manually,
as shown in the example. FastCSV does not support creating CSV files with a BOM header by itself.
Expand Down
6 changes: 6 additions & 0 deletions docs/src/content/docs/guides/Examples/handle-comments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ maximum compatibility with the RFC 4180 standard.

<Code code={readSourceCode} title="ExampleCsvReaderWithComments.java" lang="java" />

You also find this source code example in the
[FastCSV GitHub repository](https://github.com/osiegmar/FastCSV/blob/main/example/src/main/java/example/ExampleCsvReaderWithComments.java).

## Writing CSV files with comments

Writing comments to a CSV file is straightforward, as FastCSV takes care of any necessary escaping or line breaks.
Expand All @@ -52,3 +55,6 @@ Be aware that comments are not part of the CSV standard and may not be supported
:::

<Code code={writeSourceCode} title="ExampleCsvWriterWithComments.java" lang="java" />

You also find this source code example in the
[FastCSV GitHub repository](https://github.com/osiegmar/FastCSV/blob/main/example/src/main/java/example/ExampleCsvWriterWithComments.java).
3 changes: 3 additions & 0 deletions docs/src/content/docs/guides/Examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ title: Overview

This section provides a variety of examples to help you get started with FastCSV.

While FastCSV is compatible with Java 11 and later, the examples in this section use
Java 21 to demonstrate modern Java features and syntax for the sake of brevity.

You find all source code examples in the [FastCSV GitHub repository](https://github.com/osiegmar/FastCSV/tree/main/example/src/main/java/example).
3 changes: 3 additions & 0 deletions docs/src/content/docs/guides/Examples/read-from-classpath.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ This includes reading from the classpath.
In the following example, a CSV file is read from the classpath.

<Code code={sourceCode} title="ExampleCsvReaderWithClasspathInput.java" lang="java"/>

You also find this source code example in the
[FastCSV GitHub repository](https://github.com/osiegmar/FastCSV/blob/main/example/src/main/java/example/ExampleCsvReaderWithClasspathInput.java).

0 comments on commit 66caf29

Please sign in to comment.