You are here

function _features_linetrim in Features 7.2

Same name and namespace in other branches
  1. 6 features.export.inc \_features_linetrim()
  2. 7 features.export.inc \_features_linetrim()

Helper function to eliminate whitespace differences in code.

Parameters

string $code: Original (multi-line) piece of code.

Return value

string Modified piece of code with no leading or trailing whitespace per line.

2 calls to _features_linetrim()
features_detect_overrides in ./features.export.inc
Detect differences between DB and code components of a feature.
features_get_signature in ./features.export.inc
Gets an md5 signature for a the state of an object in code or database.

File

./features.export.inc, line 1453
Contains functions that export configuration into feature modules.

Code

function _features_linetrim($code) {
  $code = explode("\n", $code);
  foreach ($code as $k => $line) {
    $code[$k] = trim($line);
  }
  return implode("\n", $code);
}