소스 검색

Slightly more consistent use of backticks in the docs

Gama11 10 년 전
부모
커밋
99ab589973
13개의 변경된 파일46개의 추가작업 그리고 46개의 파일을 삭제
  1. 1 1
      std/Array.hx
  2. 2 2
      std/Date.hx
  3. 1 1
      std/DateTools.hx
  4. 2 2
      std/EReg.hx
  5. 1 1
      std/Lambda.hx
  6. 2 2
      std/Reflect.hx
  7. 8 8
      std/String.hx
  8. 22 22
      std/StringTools.hx
  9. 1 1
      std/Sys.hx
  10. 1 1
      std/Type.hx
  11. 1 1
      std/haxe/EnumTools.hx
  12. 3 3
      std/haxe/io/Path.hx
  13. 1 1
      std/haxe/macro/Type.hx

+ 1 - 1
std/Array.hx

@@ -173,7 +173,7 @@ extern class Array<T> {
 
 		The result will include the individual elements' String representations
 		separated by comma. The enclosing [ ] may be missing on some platforms,
-		use Std.string() to get a String representation that is consistent
+		use `Std.string()` to get a String representation that is consistent
 		across platforms.
 	**/
 	function toString() : String;

+ 2 - 2
std/Date.hx

@@ -29,9 +29,9 @@
 	- `Date.fromTime()` with a given timestamp or
 	- `Date.fromString()` by parsing from a String.
 
-	There is some extra functions available in the `DateTools` class.
+	There are some extra functions available in the `DateTools` class.
 
-	In the context of haxe dates, a timestamp is defined as the number of
+	In the context of Haxe dates, a timestamp is defined as the number of
 	milliseconds elapsed since 1st January 1970.
 **/
 extern class Date

+ 1 - 1
std/DateTools.hx

@@ -24,7 +24,7 @@
 	The DateTools class contains some extra functionalities for handling `Date`
 	instances and timestamps.
 
-	In the context of haxe dates, a timestamp is defined as the number of
+	In the context of Haxe dates, a timestamp is defined as the number of
 	milliseconds elapsed since 1st January 1970.
 **/
 class DateTools {

+ 2 - 2
std/EReg.hx

@@ -28,7 +28,7 @@
 	off to retain a certain level of performance.
 
 	EReg instances can be created by calling the constructor, or with the
-	special syntax ~/pattern/modifier
+	special syntax `~/pattern/modifier`
 
 	EReg instances maintain an internal state, which is affected by several of
 	its methods.
@@ -145,7 +145,7 @@ class EReg {
 		empty String "" entry.
 
 		If two matching substrings appear next to each other, the result
-		contains the empty String "" between them.
+		contains the empty String `""` between them.
 
 		By default, this method splits `s` into two parts at the first matched
 		substring. If the global g modifier is in place, `s` is split at each

+ 1 - 1
std/Lambda.hx

@@ -22,7 +22,7 @@
 
 /**
 	The `Lambda` class is a collection of methods to support functional
-	programming. It is ideally used with 'using Lambda' and then acts as an
+	programming. It is ideally used with `using Lambda` and then acts as an
 	extension to Iterable types.
 
 	On static platforms, working with the Iterable structure might be slower

+ 2 - 2
std/Reflect.hx

@@ -148,8 +148,8 @@ extern class Reflect {
 
 		- class instance
 		- structure
-		- Class<T>
-		- Enum<T>
+		- `Class<T>`
+		- `Enum<T>`
 
 		Otherwise, including if `v` is null, the result is false.
 	**/

+ 8 - 8
std/String.hx

@@ -22,10 +22,10 @@
 /**
 	The basic String class.
 
-	A haxe String is immutable, it is not possible to modify individual
+	A Haxe String is immutable, it is not possible to modify individual
 	characters. No method of this class changes the state of `this` String.
 
-	Strings can be constructed using the string literal syntax "string value".
+	Strings can be constructed using the String literal syntax "string value".
 
 	String can be concatenated by using the + operator. If an operand is not a
 	String, it is passed through Std.string() first.
@@ -59,7 +59,7 @@ extern class String {
 	/**
 		Returns the character at position `index` of `this` String.
 
-		If `index` is negative or exceeds `this.length`, the empty String ""
+		If `index` is negative or exceeds `this.length`, the empty String `""`
 		is returned.
 	**/
 	function charAt(index : Int) : String;
@@ -67,11 +67,11 @@ extern class String {
 	/**
 		Returns the character code at position `index` of `this` String.
 
-		If `index` is negative or exceeds `this.length`, null is returned.
+		If `index` is negative or exceeds `this.length`, `null` is returned.
 
-		To obtain the character code of a single character, "x".code can be used
-		instead to inline the character code at compile time. Note that this
-		only works on String literals of length 1.
+		To obtain the character code of a single character, `"x".code` can be
+		used instead to inline the character code at compile time. Note that
+		this only works on String literals of length 1.
 	**/
 	function charCodeAt( index : Int) : Null<Int>;
 
@@ -104,7 +104,7 @@ extern class String {
 	/**
 		Splits `this` String at each occurence of `delimiter`.
 
-		If `this` String is the empty String "", the result is not consistent
+		If `this` String is the empty String `""`, the result is not consistent
 		across targets and may either be `[]` (on Js, Cpp) or `[""]`.
 
 		If `delimiter` is the empty String "", `this` String is split into an

+ 22 - 22
std/StringTools.hx

@@ -21,7 +21,7 @@
  */
 /**
 	This class provides advanced methods on Strings. It is ideally used with
-	'using StringTools' and then acts as an extension to the String class.
+	`using StringTools` and then acts as an extension to the String class.
 
 	If the first argument to any of the methods is null, the result is
 	unspecified.
@@ -103,7 +103,7 @@ class StringTools {
 		Unescapes HTML special characters of the string `s`.
 
 		This is the inverse operation to htmlEscape, i.e. the following always
-		holds: htmlUnescape(htmlEscape(s)) == s
+		holds: `htmlUnescape(htmlEscape(s)) == s`
 
 		The replacements follow:
 
@@ -120,9 +120,9 @@ class StringTools {
 	/**
 		Tells if the string `s` starts with the string `start`.
 
-		If `start` is null, the result is unspecified.
+		If `start` is `null`, the result is unspecified.
 
-		If `start` is the empty String "", the result is true.
+		If `start` is the empty String `""`, the result is true.
 	**/
 	public static #if (cs || java) inline #end function startsWith( s : String, start : String ) : Bool {
 		#if java
@@ -146,9 +146,9 @@ class StringTools {
 	/**
 		Tells if the string `s` ends with the string `end`.
 
-		If `end` is null, the result is unspecified.
+		If `end` is `null`, the result is unspecified.
 
-		If `end` is the empty String "", the result is true.
+		If `end` is the empty String `""`, the result is true.
 	**/
 	public static #if (cs || java) inline #end function endsWith( s : String, end : String ) : Bool {
 		#if java
@@ -177,7 +177,7 @@ class StringTools {
 		A character is considered to be a space character if its character code
 		is 9,10,11,12,13 or 32.
 
-		If `s` is the empty String "", or if pos is not a valid position within
+		If `s` is the empty String `""`, or if pos is not a valid position within
 		`s`, the result is false.
 	**/
 	public static function isSpace( s : String, pos : Int ) : Bool {
@@ -191,11 +191,11 @@ class StringTools {
 	/**
 		Removes leading space characters of `s`.
 
-		This function internally calls isSpace() to decide which characters to
+		This function internally calls `isSpace()` to decide which characters to
 		remove.
 
-		If `s` is the empty String "" or consists only of space characters, the
-		result is the empty String "".
+		If `s` is the empty String `""` or consists only of space characters, the
+		result is the empty String `""`.
 	**/
 	public #if cs inline #end static function ltrim( s : String ) : String {
 		#if cs
@@ -216,11 +216,11 @@ class StringTools {
 	/**
 		Removes trailing space characters of `s`.
 
-		This function internally calls isSpace() to decide which characters to
+		This function internally calls `isSpace()` to decide which characters to
 		remove.
 
-		If `s` is the empty String "" or consists only of space characters, the
-		result is the empty String "".
+		If `s` is the empty String `""` or consists only of space characters, the
+		result is the empty String `""`.
 	**/
 	public #if cs inline #end static function rtrim( s : String ) : String {
 		#if cs
@@ -242,7 +242,7 @@ class StringTools {
 	/**
 		Removes leading and trailing space characters of `s`.
 
-		This is a convenience function for ltrim(rtrim(s)).
+		This is a convenience function for `ltrim(rtrim(s))`.
 	**/
 	public #if (cs || java) inline #end static function trim( s : String ) : String {
 		#if cs
@@ -257,7 +257,7 @@ class StringTools {
 	/**
 		Concatenates `c` to `s` until `s.length` is at least `l`.
 
-		If `c` is the empty String "" or if `l` does not exceed `s.length`,
+		If `c` is the empty String `""` or if `l` does not exceed `s.length`,
 		`s` is returned unchanged.
 
 		If `c.length` is 1, the resulting String length is exactly `l`.
@@ -279,7 +279,7 @@ class StringTools {
 	/**
 		Appends `c` to `s` until `s.length` is at least `l`.
 
-		If `c` is the empty String "" or if `l` does not exceed `s.length`,
+		If `c` is the empty String `""` or if `l` does not exceed `s.length`,
 		`s` is returned unchanged.
 
 		If `c.length` is 1, the resulting String length is exactly `l`.
@@ -302,8 +302,8 @@ class StringTools {
 		Replace all occurences of the String `sub` in the String `s` by the
 		String `by`.
 
-		If `sub` is the empty String "", `by` is inserted after each character
-		of `s`. If `by` is also the empty String "", `s` remains unchanged.
+		If `sub` is the empty String `""`, `by` is inserted after each character
+		of `s`. If `by` is also the empty String `""`, `s` remains unchanged.
 
 		This is a convenience function for `s.split(sub).join(by)`.
 
@@ -329,7 +329,7 @@ class StringTools {
 		Encodes `n` into a hexadecimal representation.
 
 		If `digits` is specified, the resulting String is padded with "0" until
-		its length equals `digits`.
+		its `length` equals `digits`.
 	**/
 	public static function hex( n : Int, ?digits : Int ) {
 		#if flash
@@ -363,14 +363,14 @@ class StringTools {
 		Returns the character code at position `index` of String `s`, or an
 		end-of-file indicator at if `position` equals `s.length`.
 
-		This method is faster than String.charCodeAt() on some platforms, but
+		This method is faster than `String.charCodeAt()` on some platforms, but
 		the result is unspecified if `index` is negative or greater than
 		`s.length`.
 
-		End of file status can be checked by calling `StringTools.isEof` with
+		End of file status can be checked by calling `StringTools.isEof()` with
 		the returned value as argument.
 
-		This operation is not guaranteed to work if `s` contains the \0
+		This operation is not guaranteed to work if `s` contains the `\0`
 		character.
 	**/
 	public static inline function fastCodeAt( s : String, index : Int ) : Int {

+ 1 - 1
std/Sys.hx

@@ -31,7 +31,7 @@ extern class Sys {
 	static function print( v : Dynamic ) : Void;
 
 	/**
-		Print any value on the standard output, followed by a newline
+		Print any value on the standard output, followed by a newline.
 	**/
 	static function println( v : Dynamic ) : Void;
 

+ 1 - 1
std/Type.hx

@@ -284,7 +284,7 @@ extern class Type {
 		Returns a list of all constructors of enum `e` that require no
 		arguments.
 
-		This may return the empty Array [] if all constructors of `e` require
+		This may return the empty Array `[]` if all constructors of `e` require
 		arguments.
 
 		Otherwise an instance of `e` constructed through each of its non-

+ 1 - 1
std/haxe/EnumTools.hx

@@ -75,7 +75,7 @@ extern class EnumTools {
 		Returns a list of all constructors of enum `e` that require no
 		arguments.
 
-		This may return the empty Array [] if all constructors of `e` require
+		This may return the empty Array `[]` if all constructors of `e` require
 		arguments.
 
 		Otherwise an instance of `e` constructed through each of its non-

+ 3 - 3
std/haxe/io/Path.hx

@@ -140,7 +140,7 @@ class Path {
 	/**
 		Returns the directory of `path`.
 
-		If the directory is null, the empty String "" is returned.
+		If the directory is null, the empty String `""` is returned.
 
 		If `path` is null, the result is unspecified.
 	**/
@@ -154,7 +154,7 @@ class Path {
 	/**
 		Returns the extension of `path`.
 
-		If the extension is null, the empty String "" is returned.
+		If the extension is null, the empty String `""` is returned.
 
 		If `path` is null, the result is unspecified.
 	**/
@@ -258,7 +258,7 @@ class Path {
 
 		If the last slash in `path` is a slash, or if no slash is found, a slash
 		is appended to `path`. In particular, this applies to the empty String
-		"".
+		`""`.
 
 		If `path` is null, the result is unspecified.
 	**/

+ 1 - 1
std/haxe/macro/Type.hx

@@ -529,7 +529,7 @@ typedef MetaAccess = {
 	/**
 		Extract metadata entries by given `name`.
 
-		If there's no metadata with such name, empty array is returned.
+		If there's no metadata with such name, empty array `[]` is returned.
 
 		If `name` is null, compilation fails with an error.
 	**/