Skip to content

Commit

Permalink
Support formatting a StringValue span
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Jun 19, 2022
1 parent 2fbdb31 commit 45f4cb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/com/drew/metadata/StringValue.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 Drew Noakes and contributors
* Copyright 2002-2022 Drew Noakes and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -73,4 +73,9 @@ public String toString(@Nullable Charset charset)

return new String(_bytes);
}

public String toString(int index, int count)
{
return new String(_bytes, index, count, _charset != null ? _charset : Charset.defaultCharset());
}
}

0 comments on commit 45f4cb5

Please sign in to comment.