Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinetwigs committed Jun 7, 2022
2 parents a03e53c + 93c2171 commit db805c1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![License](https://img.shields.io/badge/License-Apache_License_2.0-orange)](#license)
[![issues - vilmos](https://img.shields.io/github/issues/Vinetwigs/stres)](https://github.com/Vinetwigs/stres/issues)

<h1 align="center">stres - String resources in Go</h1>
<h1 align="center">stres - Android Studio string resources in Go</h1>
<p align="center">
<i>
A simple and easy-to-use library to import and export string resources into your Go applications just like you would do in Android Studio.
Expand Down Expand Up @@ -148,9 +148,9 @@ type Nesting struct {
`String, err := stres.NewString("name", "value")`


| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name to identify the string | | | | | | | |
| Parameter | Type | Description |
|-----------|--------|---------------------------------------|
| name | string | unique name to identify the string |
| value | string | string to associate to the given name |

Returns String instance and error.
Expand All @@ -162,10 +162,10 @@ Returns String instance and error.

`strArr, err := stres.NewStringArray("name", []string{"value1","value2",...})`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name to identify the string | | | | | | | |
| values | []string | array of strings to associate to the given name |
| Parameter | Type | Description |
|-----------|--------|---------------------------------------|
| name | string | unique name to identify the string |
| values | []string | array of strings to associate to the given name |

Returns StringArray instance and error.

Expand All @@ -177,8 +177,8 @@ Returns StringArray instance and error.
`qntStr, err := stres.NewQuantityString("name", []string{"zero","one", "two", ...})`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name to identify the string | | | | | | | |
|-----------|--------|---------------------------------------|
| name | string | unique name to identify the string |
| values | []string | array of strings for quantities to associate to the given name |

Returns Plural instance and error.
Expand All @@ -191,8 +191,8 @@ Returns Plural instance and error.
`stres.SetFewThreshold(25)`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| value | int | new value for 'few' threshold | | | | | | | |
|-----------|--------|---------------------------------------|
| value | int | new value for 'few' threshold |

Returns Plural instance and error.

Expand All @@ -204,8 +204,8 @@ Returns Plural instance and error.
`str := GetString("name")`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name given to the corresponding string | | | | | | | |
|-----------|--------|---------------------------------------|
| name | string | unique name given to the corresponding string |

Returns a string.

Expand All @@ -217,8 +217,8 @@ Returns a string.
`strArr := GetStringArray("name")`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name given to the corresponding string-array | | | | | | | |
|-----------|--------|---------------------------------------|
| name | string | unique name given to the corresponding string-array |

Returns an array of strings.

Expand All @@ -230,10 +230,16 @@ Returns an array of strings.
`strArr := GetQuantityString("name", 10)`

| Parameter | Type | Description |
|-----------|--------|---------------------------------------|---|---|---|---|---|---|---|
| name | string | unique name to identify the string | | | | | | | |
|-----------|--------|---------------------------------------|
| name | string | unique name to identify the string |
| count | int | quantity to fetch the corresponding string |

Returns a string.

[Back to top](#table-of-contents)
[Back to top](#table-of-contents)

## Contributors

<a href="https://github.com/Vinetwigs/stres/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Vinetwigs/stres" />
</a>
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/Vinetwigs/stres

go 1.17
go 1.17

0 comments on commit db805c1

Please sign in to comment.