Skip to content

Commit 5d4b76a

Browse files
author
Sven Ulrich
committed
updatedeps: renamed emptyString
1 parent 3db60ce commit 5d4b76a

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ When migrating from Version 1.4.1 or lower, you can also import the class `Strin
2323

2424
### String.empty
2525
```typescript
26-
var id = empty; // or String.empty
26+
var id = emptyString; // or String.empty
2727
// output: id = '';
2828
```
2929

@@ -37,24 +37,24 @@ if(isNullOrWhiteSpace(id)) // String.isNullOrWhiteSpace(id)
3737

3838
```typescript
3939
var id = image.GetId()
40-
format("image_{0}.jpg", id) // or String.format()
40+
formatString("image_{0}.jpg", id) // or String.format()
4141
output: "image_2db5da20-1c5d-4f1a-8fd4-b41e34c8c5b5.jpg";
4242
```
4343

4444
Specifier available!
4545
```typescript
46-
var value = format("{0:L}", "APPLE"); //output "apple"
46+
var value = formatString("{0:L}", "APPLE"); //output "apple"
4747

48-
value = format("{0:U}", "apple"); // output "APPLE"
48+
value = formatString("{0:U}", "apple"); // output "APPLE"
4949

50-
value = format("{0:d}", "2017-01-23 00:00"); //output "23.01.2017"
50+
value = formatString("{0:d}", "2017-01-23 00:00"); //output "23.01.2017"
5151

52-
value = format("{0:s}", "21.03.2017 22:15:01") //output "2017-03-21T22:15:01"
52+
value = formatString("{0:s}", "21.03.2017 22:15:01") //output "2017-03-21T22:15:01"
5353

54-
value = format("{0:n}", 1000000);
54+
value = formatString("{0:n}", 1000000);
5555
//output "1.000.000"
5656

57-
value = format("{0:00}", 1);
57+
value = formatString("{0:00}", 1);
5858
//output "01"
5959
```
6060

@@ -88,18 +88,18 @@ format("the {type:U} is {color:L} shipped on {shippingDate:s} with an amount of
8888
### String.join():
8989

9090
```typescript
91-
var value = join("; ", "Apple", "Banana"); // or String.join()
91+
var value = joinString("; ", "Apple", "Banana"); // or String.join()
9292
//output: "Apple; Banana";
9393
```
9494
#### OR
9595

9696
```typescript
9797
let object = { Name: "Foo", Value: "Bar" };
98-
var value = join('.', object);
98+
var value = joinString('.', object);
9999
//output: "Foo.Bar";
100100

101101
var array = ['Apple', 'Banana']
102-
var value = join("; ", array);
102+
var value = joinString("; ", array);
103103
//output: "Apple; Banana";
104104
```
105105

@@ -108,10 +108,10 @@ var value = join("; ", array);
108108
| Method | Type | Description | Parameter |
109109
| :------------------------:|:-----------:|:--------------------------:|:----------:|
110110
| `empty` | `Property` | simply returns `""`. |
111-
| `isNullOrWhiteSpace` | `Method` | returns true value if given parameter is either null, empty or undefined. | `format`, `args`
112-
| `format` | `Method` | Converts the value of objects to strings based on the formats specified and inserts them into another string. | `format`, `args`
113-
| `join` | `Method` | Combines arguments delimited by given seperator.| `delimiter`,`args`
114-
| `join` | `Method` | Combines arguments delimited by given seperator from array. | `delimiter`,`array` |
111+
| `isNullOrWhiteSpace` | `Method` | returns true value if given parameter is either null, empty or undefined. | `format`, `...args`
112+
| `format`/`formatString` | `Method` | Converts the value of objects to strings based on the formats specified and inserts them into another string. | `format`, `...args`
113+
| `join`/`joinString` | `Method` | Combines arguments delimited by given seperator.| `delimiter`,`...args`
114+
| `join`/`joinString` | `Method` | Combines arguments delimited by given seperator from array. | `delimiter`,`array` |
115115

116116

117117
### StringBuilder

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export declare const empty = "";
1+
export declare const emptyString = "";
22
export declare function isNullOrWhiteSpace(value: string | null): boolean;
33
export declare function joinString(delimiter: string, ...args: (string | object | Array<any>)[]): string;
44
export declare function formatString(format: string, ...args: any[]): string;

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const EOL = '\r\n';
22

3-
export const empty = '';
3+
export const emptyString = '';
44

55
export function isNullOrWhiteSpace(value: string | null): boolean {
66
return String.isNullOrWhiteSpace(value);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-string-operations",
3-
"version": "1.5.0-rc.13",
3+
"version": "1.5.0-rc.14",
44
"description": "Simple lightweight string operation library for Typescript, works with Angular",
55
"main": "dist/index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)